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;
|
bool success = true;
|
||||||
|
|
||||||
void runTest(QObject *test) {
|
static void runTest(QObject *test, int argc, char** argv) {
|
||||||
int retVal = QTest::qExec(test);
|
int retVal = QTest::qExec(test, argc, argv);
|
||||||
delete test;
|
delete test;
|
||||||
success &= retVal == 0;
|
success &= retVal == 0;
|
||||||
}
|
}
|
||||||
@ -15,7 +15,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
QCoreApplication a(argc, argv);
|
QCoreApplication a(argc, argv);
|
||||||
|
|
||||||
runTest(new ConnectionTest());
|
runTest(new ConnectionTest(), argc, argv);
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
qDebug() << "SUCCESS";
|
qDebug() << "SUCCESS";
|
||||||
|
Loading…
Reference in New Issue
Block a user