From 4c6c7e6474bef34c4bed0d3eb9889012319c938f Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Sat, 6 Oct 2001 09:16:31 +0000 Subject: Examples/cppunittest/CppUnitTestMain. examples/cppunittest/CppUnitTestMain.cpp : application returns 0 is test suite run sucessfuly, 1 otherwise. * src/cppunit/Exception.cpp : bug fix, operator =() with VC++. Removed call to std::exception::operator =() which is bugged on VC++. * doc/FAQ : added a note explaining why the test ExceptionTest.testAssignment used to fail. * NEWS : updated and detailed. * include/cppunit/TestResult.h : * src/cppunit/TestResult.cpp : added reset(). * include/cppunit/TextTestRunner.h : * src/cppunit/TextTestRunner.cpp : Constructor take an optional TextTestRestult. The TextTestResult remain alive as long as the runner. Added result() to retreive the result. Printing the result is now optinal (enabled by default). --- examples/cppunittest/CppUnitTestMain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/cppunittest/CppUnitTestMain.cpp') diff --git a/examples/cppunittest/CppUnitTestMain.cpp b/examples/cppunittest/CppUnitTestMain.cpp index baa8b39..4b62612 100644 --- a/examples/cppunittest/CppUnitTestMain.cpp +++ b/examples/cppunittest/CppUnitTestMain.cpp @@ -8,8 +8,8 @@ main( int argc, char* argv[] ) CppUnit::TextTestRunner runner; runner.addTest( CppUnitTest::suite() ); - runner.run(); + bool wasSucessful = runner.run(); - return 0; + return wasSucessful ? 0 : 1; } -- cgit v1.2.1