Tests to run can be specified in command line

This commit is contained in:
Vladimir Kolesnikov 2013-02-10 16:10:38 +02:00
parent 8156bc0a95
commit 6339318cde

View File

@ -5,8 +5,8 @@
bool success = true;
void runTest(QObject *test) {
int retVal = QTest::qExec(test);
static void runTest(QObject *test, int argc, char** argv) {
int retVal = QTest::qExec(test, argc, argv);
delete test;
success &= retVal == 0;
}
@ -15,7 +15,7 @@ int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
runTest(new ConnectionTest());
runTest(new ConnectionTest(), argc, argv);
if (success)
qDebug() << "SUCCESS";