Restore OnRun() in the non-GUI unit test suite.
Commit 3e67b1ef68
broke the test suite in
non-GUI case, we still need to override OnRun() then to run the tests.
Also make it more clear that m_exitcode is only used in the GUI case.
This commit is contained in:
parent
9e6fc99af0
commit
2d7875c926
@ -344,7 +344,12 @@ public:
|
||||
|
||||
return m_exitcode;
|
||||
}
|
||||
#endif // wxUSE_GUI
|
||||
#else // !wxUSE_GUI
|
||||
virtual int OnRun()
|
||||
{
|
||||
return RunTests();
|
||||
}
|
||||
#endif // wxUSE_GUI/!wxUSE_GUI
|
||||
|
||||
private:
|
||||
void List(Test *test, const string& parent = "") const;
|
||||
@ -375,8 +380,10 @@ private:
|
||||
FilterEventFunc m_filterEventFunc;
|
||||
ProcessEventFunc m_processEventFunc;
|
||||
|
||||
#if wxUSE_GUI
|
||||
// the program exit code
|
||||
int m_exitcode;
|
||||
#endif // wxUSE_GUI
|
||||
};
|
||||
|
||||
IMPLEMENT_APP_NO_MAIN(TestApp)
|
||||
@ -512,7 +519,9 @@ TestApp::TestApp()
|
||||
|
||||
m_locale = NULL;
|
||||
|
||||
#if wxUSE_GUI
|
||||
m_exitcode = EXIT_SUCCESS;
|
||||
#endif // wxUSE_GUI
|
||||
}
|
||||
|
||||
// Init
|
||||
|
Loading…
Reference in New Issue
Block a user