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()
{
#if wxUSE_LOG
// Switch off logging unless --verbose
bool verbose = wxLog::GetVerbose();
wxLog::EnableLogging(verbose);
#else
bool verbose = false;
// Switch off logging to avoid interfering with the tests output unless
// WXTRACE is set, as otherwise setting it would have no effect while
// running the tests.
if ( !wxGetEnv("WXTRACE", NULL) )
wxLog::EnableLogging(false);
#endif
// Cast is needed under MSW where Catch also provides an overload taking