From 8237e39f5dfa5e6e43aca7d7b9107c666d40de7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 6 Feb 2020 12:07:04 +0100 Subject: testlib: Move subtest argument handling to individual tests The test orchestrator shouldn't have to deal with the individual options needed for each test. Change-Id: I78bbf4850cc649e625bd08a7aedf02267ba1314d Reviewed-by: Edward Welbourne --- tests/auto/testlib/selftests/silent/tst_silent.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests/auto/testlib/selftests/silent/tst_silent.cpp') diff --git a/tests/auto/testlib/selftests/silent/tst_silent.cpp b/tests/auto/testlib/selftests/silent/tst_silent.cpp index 999d9acf07..7d64efffa2 100644 --- a/tests/auto/testlib/selftests/silent/tst_silent.cpp +++ b/tests/auto/testlib/selftests/silent/tst_silent.cpp @@ -102,5 +102,14 @@ void tst_Silent::messages() qFatal("This is a fatal error message that should still appear in silent test output"); } -QTEST_MAIN(tst_Silent) +int main(int argc, char *argv[]) +{ + std::vector args(argv, argv + argc); + args.push_back("-silent"); + argc = args.size(); + argv = const_cast(&args[0]); + + QTEST_MAIN_IMPL(tst_Silent) +} + #include "tst_silent.moc" -- cgit v1.2.3