From 0dffa8059d64a57dae9fc12a9e4d4a8b313804c0 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Fri, 22 Oct 2010 22:15:07 +0000 Subject: [PATCH 1/1] Change the return code of the test program so that aborting a test with an exception doesn't count as a failure, to provide a way to skip tests that can't be performed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test.cpp b/tests/test.cpp index ca957f81d2..983bc4f3ce 100644 --- a/tests/test.cpp +++ b/tests/test.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef __VISUALC__ #pragma warning(default:4100) @@ -617,7 +618,9 @@ int TestApp::OnRun() runner.eventManager().pushProtector(new wxUnitTestProtector); bool printProgress = !(verbose || m_detail || m_timing); - return runner.run("", false, true, printProgress) ? EXIT_SUCCESS : EXIT_FAILURE; + runner.run("", false, true, printProgress); + + return runner.result().testFailures() == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } int TestApp::OnExit() -- 2.45.2