diff options
author | Steve M. Robbins <smr@sumost.ca> | 2001-06-02 21:29:52 +0000 |
---|---|---|
committer | Steve M. Robbins <smr@sumost.ca> | 2001-06-02 21:29:52 +0000 |
commit | cdbca4119defbc5f9698906633eec05b5dc8272a (patch) | |
tree | 6f0fc91b8cb7cc7b361966ffc8ab2e401e1e4c6e /examples/cppunittest/TestCallerTest.cpp | |
parent | 99f54c0f4b53debc49f2081ce01158b2ed200c30 (diff) | |
download | cppunit-cdbca4119defbc5f9698906633eec05b5dc8272a.tar.gz |
Change to templatized TestAssert::assertEquals() and the new CPPUNIT_ASSERT* macros
Diffstat (limited to 'examples/cppunittest/TestCallerTest.cpp')
-rw-r--r-- | examples/cppunittest/TestCallerTest.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/examples/cppunittest/TestCallerTest.cpp b/examples/cppunittest/TestCallerTest.cpp index 43cd39f..d9cab55 100644 --- a/examples/cppunittest/TestCallerTest.cpp +++ b/examples/cppunittest/TestCallerTest.cpp @@ -96,7 +96,7 @@ TestCallerTest::testBasicConstructor() checkRunningSequenceCalled(); } // Force destruction of the test caller. - assertLongsEqual( 1, m_destructorCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_destructorCount ); } @@ -115,7 +115,7 @@ TestCallerTest::testReferenceConstructor() checkRunningSequenceCalled(); } // Force destruction of the test caller. - assertLongsEqual( 0, m_destructorCount ); + CPPUNIT_ASSERT_EQUAL( 0, m_destructorCount ); } @@ -134,32 +134,32 @@ TestCallerTest::testPointerConstructor() checkRunningSequenceCalled(); } // Force destruction of the test caller. - assertLongsEqual( 1, m_destructorCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_destructorCount ); } void TestCallerTest::checkNothingButConstructorCalled() { - assertLongsEqual( 1, m_constructorCount ); - assertLongsEqual( 0, m_destructorCount ); - assertLongsEqual( 0, m_setUpCount ); - assertLongsEqual( 0, m_tearDownCount ); - assertLongsEqual( 0, m_testCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_constructorCount ); + CPPUNIT_ASSERT_EQUAL( 0, m_destructorCount ); + CPPUNIT_ASSERT_EQUAL( 0, m_setUpCount ); + CPPUNIT_ASSERT_EQUAL( 0, m_tearDownCount ); + CPPUNIT_ASSERT_EQUAL( 0, m_testCount ); } void TestCallerTest::checkRunningSequenceCalled() { - assertLongsEqual( 1, m_setUpCount ); - assertLongsEqual( 1, m_testCount ); - assertLongsEqual( 1, m_tearDownCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_setUpCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_testCount ); + CPPUNIT_ASSERT_EQUAL( 1, m_tearDownCount ); } void TestCallerTest::checkTestName( std::string testName ) { - assert( testName == m_testName ); + CPPUNIT_ASSERT( testName == m_testName ); } |