Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 4.10.0-rc1
-
None
Description
I have some small projects with auto tests directly integrated in the main program.
They are started by passing "--test" as first parameter to main, which then delegates to QTest.
int runTests(int argc, char *argv[]) { tst_MyTest tc; const int result = QTest::qExec(&tc, argc, argv); return result; } int main(int argc, char *argv[]) { QApplication a(argc, argv); if (argc > 1 && qstrcmp(argv[1], "--test") == 0) { return runTests(argc - 1, &argv[1]); } MainWindow w; w.show(); return a.exec(); }
The tests are recognized correctly by the auto test plugin, and the correct executable is started. However, due to the missing "--test" parameter, my tests are not run.
If I could enter this parameter somewhere, then it should already work.