[Cppunit-cvs] cppunit2/src/cpputtest testbasicassertion.cpp,1.8,1.9 testfunctor.cpp,1.9,1.10 testtes
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-02-27 16:50:54
|
Update of /cvsroot/cppunit/cppunit2/src/cpputtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14477/src/cpputtest Modified Files: testbasicassertion.cpp testfunctor.cpp testtestcase.cpp testtestsuite.cpp Log Message: * catch any exceptions that the test may leak. Index: testbasicassertion.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testbasicassertion.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testbasicassertion.cpp 27 Feb 2005 16:30:34 -0000 1.8 --- testbasicassertion.cpp 27 Feb 2005 16:50:35 -0000 1.9 *************** *** 126,134 **** CPPUT_ASSERT_ASSERTION_FAIL(( CPPUT_ASSERT_NOT_EQUAL( "abc", std::string("abc") ) )); } ! catch ( CppUT::AbortingAssertionException &e ) { printf( "testBasicAssertions() failed: %s\n", e.what() ); return false; } return true; --- 126,139 ---- CPPUT_ASSERT_ASSERTION_FAIL(( CPPUT_ASSERT_NOT_EQUAL( "abc", std::string("abc") ) )); } ! catch ( const CppUT::AbortingAssertionException &e ) { printf( "testBasicAssertions() failed: %s\n", e.what() ); return false; } + catch ( ... ) + { + printf( "testBasicAssertions() failed (uncaught exception)." ); + return false; + } return true; Index: testtestsuite.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestsuite.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** testtestsuite.cpp 27 Feb 2005 16:30:34 -0000 1.7 --- testtestsuite.cpp 27 Feb 2005 16:50:36 -0000 1.8 *************** *** 56,64 **** CPPUT_ASSERT( test2 == suite1->testAt(1), "returned test[1] is not added test" ); } ! catch ( CppUT::AbortingAssertionException &e ) { printf( "testTestsuite() failed: %s\n", e.what() ); return false; } return true; --- 56,69 ---- CPPUT_ASSERT( test2 == suite1->testAt(1), "returned test[1] is not added test" ); } ! catch ( const CppUT::AbortingAssertionException &e ) { printf( "testTestsuite() failed: %s\n", e.what() ); return false; } + catch ( ... ) + { + printf( "testTestsuite() failed (uncaught exception)." ); + return false; + } return true; Index: testtestcase.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testtestcase.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** testtestcase.cpp 27 Feb 2005 16:30:34 -0000 1.14 --- testtestcase.cpp 27 Feb 2005 16:50:36 -0000 1.15 *************** *** 243,251 **** testParametrizedFixture(); } ! catch ( CppUT::AbortingAssertionException &e ) { printf( "testTestCase() failed: %s\n", e.what() ); return false; } return true; --- 243,256 ---- testParametrizedFixture(); } ! catch ( const CppUT::AbortingAssertionException &e ) { printf( "testTestCase() failed: %s\n", e.what() ); return false; } + catch ( ... ) + { + printf( "testTestCase() failed (uncaught exception)." ); + return false; + } return true; Index: testfunctor.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit2/src/cpputtest/testfunctor.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** testfunctor.cpp 27 Feb 2005 16:30:34 -0000 1.9 --- testfunctor.cpp 27 Feb 2005 16:50:36 -0000 1.10 *************** *** 241,249 **** testBindRef(); } ! catch ( CppUT::AbortingAssertionException &e ) { printf( "testFunctors() failed: %s\n", e.what() ); return false; } return true; --- 241,254 ---- testBindRef(); } ! catch ( const CppUT::AbortingAssertionException &e ) { printf( "testFunctors() failed: %s\n", e.what() ); return false; } + catch ( ... ) + { + printf( "testFunctors() failed (uncaught exception)." ); + return false; + } return true; |