[Cppunit-cvs] cppunit/examples/cppunittest TestAssertTest.cpp, 1.9, 1.10
Brought to you by:
blep
From: Steven R. <sm...@us...> - 2007-01-12 05:49:46
|
Update of /cvsroot/cppunit/cppunit/examples/cppunittest In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv1384/examples/cppunittest Modified Files: TestAssertTest.cpp Log Message: Put a C++ statement in the first argument of CPPUNIT_ASSERT_THROW() and CPPUNIT_ASSERT_NO_THROW(). Index: TestAssertTest.cpp =================================================================== RCS file: /cvsroot/cppunit/cppunit/examples/cppunittest/TestAssertTest.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TestAssertTest.cpp 5 Nov 2004 22:47:21 -0000 1.9 --- TestAssertTest.cpp 12 Jan 2007 05:49:43 -0000 1.10 *************** *** 46,50 **** try { ! CPPUNIT_ASSERT_THROW( 1234, std::string ); } catch ( CPPUNIT_NS::Exception & ) --- 46,51 ---- try { ! int x; ! CPPUNIT_ASSERT_THROW( x = 1234, std::string ); } catch ( CPPUNIT_NS::Exception & ) *************** *** 60,64 **** TestAssertTest::testAssertNoThrow() { ! CPPUNIT_ASSERT_NO_THROW( 1234 ); try --- 61,66 ---- TestAssertTest::testAssertNoThrow() { ! int x; ! CPPUNIT_ASSERT_NO_THROW( x = 1234 ); try *************** *** 81,85 **** try { ! CPPUNIT_ASSERT_ASSERTION_FAIL( 1234 ); } catch ( CPPUNIT_NS::Exception & ) --- 83,88 ---- try { ! int x; ! CPPUNIT_ASSERT_ASSERTION_FAIL( x = 1234 ); } catch ( CPPUNIT_NS::Exception & ) *************** *** 95,99 **** TestAssertTest::testAssertAssertionPass() { ! CPPUNIT_ASSERT_ASSERTION_PASS( 1234 ); try --- 98,103 ---- TestAssertTest::testAssertAssertionPass() { ! int x; ! CPPUNIT_ASSERT_ASSERTION_PASS( x = 1234 ); try |