Don't disable logging in the tests if WXTRACE is set

Disabling logging makes WXTRACE useless, so avoid doing it in this case
to facilitate debugging the code exercised by the tests.
This commit is contained in:
Vadim Zeitlin 2019-10-14 23:40:08 +02:00
parent ddd7ef45d0
commit 2228caa8d4

View File

@ -577,11 +577,11 @@ bool TestApp::ProcessEvent(wxEvent& event)
int TestApp::RunTests() int TestApp::RunTests()
{ {
#if wxUSE_LOG #if wxUSE_LOG
// Switch off logging unless --verbose // Switch off logging to avoid interfering with the tests output unless
bool verbose = wxLog::GetVerbose(); // WXTRACE is set, as otherwise setting it would have no effect while
wxLog::EnableLogging(verbose); // running the tests.
#else if ( !wxGetEnv("WXTRACE", NULL) )
bool verbose = false; wxLog::EnableLogging(false);
#endif #endif
// Cast is needed under MSW where Catch also provides an overload taking // Cast is needed under MSW where Catch also provides an overload taking