diff options
Diffstat (limited to 'tests/auto/testlib/selftests/counting/tst_counting.cpp')
-rw-r--r-- | tests/auto/testlib/selftests/counting/tst_counting.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/auto/testlib/selftests/counting/tst_counting.cpp b/tests/auto/testlib/selftests/counting/tst_counting.cpp index 0831f88005..69cfc91b40 100644 --- a/tests/auto/testlib/selftests/counting/tst_counting.cpp +++ b/tests/auto/testlib/selftests/counting/tst_counting.cpp @@ -290,15 +290,18 @@ void tst_Counting::testSkipInCleanup() qDebug() << "This test function should execute and then QSKIP in cleanup()"; } -int main(int argc, char *argv[]) -{ #ifdef TESTLIB_VERBOSITY_ARG - std::vector<const char*> args(argv, argv + argc); - args.push_back(QT_STRINGIFY(TESTLIB_VERBOSITY_ARG)); - argc = int(args.size()); +#define SETUP() \ + std::vector<const char*> args(argv, argv + argc); \ + args.push_back(QT_STRINGIFY(TESTLIB_VERBOSITY_ARG)); \ + argc = int(args.size()); \ argv = const_cast<char**>(&args[0]); +#else +#define SETUP() #endif - QTEST_MAIN_IMPL(tst_Counting) -} +QTEST_MAIN_WRAPPER(tst_Counting, + SETUP() + QTEST_MAIN_SETUP()) + #include "tst_counting.moc" |