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:
@@ -344,7 +344,12 @@ public:
|
|||||||
|
|
||||||
return m_exitcode;
|
return m_exitcode;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_GUI
|
#else // !wxUSE_GUI
|
||||||
|
virtual int OnRun()
|
||||||
|
{
|
||||||
|
return RunTests();
|
||||||
|
}
|
||||||
|
#endif // wxUSE_GUI/!wxUSE_GUI
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void List(Test *test, const string& parent = "") const;
|
void List(Test *test, const string& parent = "") const;
|
||||||
@@ -375,8 +380,10 @@ private:
|
|||||||
FilterEventFunc m_filterEventFunc;
|
FilterEventFunc m_filterEventFunc;
|
||||||
ProcessEventFunc m_processEventFunc;
|
ProcessEventFunc m_processEventFunc;
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
// the program exit code
|
// the program exit code
|
||||||
int m_exitcode;
|
int m_exitcode;
|
||||||
|
#endif // wxUSE_GUI
|
||||||
};
|
};
|
||||||
|
|
||||||
IMPLEMENT_APP_NO_MAIN(TestApp)
|
IMPLEMENT_APP_NO_MAIN(TestApp)
|
||||||
@@ -512,7 +519,9 @@ TestApp::TestApp()
|
|||||||
|
|
||||||
m_locale = NULL;
|
m_locale = NULL;
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
m_exitcode = EXIT_SUCCESS;
|
m_exitcode = EXIT_SUCCESS;
|
||||||
|
#endif // wxUSE_GUI
|
||||||
}
|
}
|
||||||
|
|
||||||
// Init
|
// Init
|
||||||
|
Reference in New Issue
Block a user