summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib/selftests/silent/tst_silent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/testlib/selftests/silent/tst_silent.cpp')
-rw-r--r--tests/auto/testlib/selftests/silent/tst_silent.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/silent/tst_silent.cpp b/tests/auto/testlib/selftests/silent/tst_silent.cpp
index cf3c35dec4..7d64efffa2 100644
--- a/tests/auto/testlib/selftests/silent/tst_silent.cpp
+++ b/tests/auto/testlib/selftests/silent/tst_silent.cpp
@@ -77,7 +77,7 @@ void tst_Silent::xpass()
#include <setjmp.h>
static jmp_buf state;
-static void abort_handler(int signal)
+static void abort_handler(int)
{
longjmp(state, 1);
}
@@ -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<const char*> args(argv, argv + argc);
+ args.push_back("-silent");
+ argc = args.size();
+ argv = const_cast<char**>(&args[0]);
+
+ QTEST_MAIN_IMPL(tst_Silent)
+}
+
#include "tst_silent.moc"