>From 6eab8def52f5c10a896ccad80bd4a92ca99773ca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 9 Mar 2015 19:35:03 +0100 Subject: [PATCH 4/4] Flush wxLog after every test execution in the test suite. This ensures that any unexpected wxLog messages will be counted as failures in the test during which they were logged instead of being attributed to the last test to run at the very end. --- main_wx_test.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main_wx_test.cpp b/main_wx_test.cpp index f614941..ace39e4 100644 --- a/main_wx_test.cpp +++ b/main_wx_test.cpp @@ -473,6 +473,9 @@ TestsResults application_test::run() wxPrintf("%s: started\n", name); wxStopWatch sw; i->run_test(); + // Check that no messages were unexpectedly logged during this + // test execution. + wxLog::FlushActive(); wxPrintf("time=%ldms (for %s)\n", sw.Time(), name); wxPrintf("%s: ok\n", name); results.passed++; -- 2.1.0