Tests to run can be specified in command line
This commit is contained in:
parent
8156bc0a95
commit
6339318cde
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user