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). --- src/cppunit/Exception.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cppunit/Exception.cpp') diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp index 3a4efd0..80b005a 100644 --- a/src/cppunit/Exception.cpp +++ b/src/cppunit/Exception.cpp @@ -61,7 +61,10 @@ Exception::~Exception () throw() Exception& Exception::operator =( const Exception& other ) { - SuperClass::operator =(other); +// Don't call superclass operator =(). VC++ STL implementation +// has a bug. It calls the destructor and copy constructor of +// std::exception() which reset the virtual table to std::exception. +// SuperClass::operator =(other); if ( &other != this ) { -- cgit v1.2.1