diff options
| author | Steve M. Robbins <smr@sumost.ca> | 2001-07-13 03:32:16 +0000 |
|---|---|---|
| committer | Steve M. Robbins <smr@sumost.ca> | 2001-07-13 03:32:16 +0000 |
| commit | 8cdfc19f2213bf1de4aee4bc5e799af49b6608d0 (patch) | |
| tree | a2ee78ef29c07a7cf5d5077885364b9d86ecc69a | |
| parent | c9e6d8ad1f9201030bbfeb27164cf748c96f21c6 (diff) | |
| download | cppunit-8cdfc19f2213bf1de4aee4bc5e799af49b6608d0.tar.gz | |
Add tests for CPPUNIT_ASSERT_EQUAL.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | examples/cppunittest/TestAssertTest.cpp | 11 | ||||
| -rw-r--r-- | examples/cppunittest/TestAssertTest.h | 3 |
3 files changed, 20 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2001-07-13 Steve M. Robbins <steve@nyongwa.montreal.qc.ca> + + * examples/cppunittest/TestAssertTest.h: + * examples/cppunittest/TestAssertTest.cpp: Add tests + for CPPUNIT_ASSERT_EQUAL. + 2001-07-12 Steve M. Robbins <steve@nyongwa.montreal.qc.ca> * configure.in: Set to version 1.5.6. On the assumption that diff --git a/examples/cppunittest/TestAssertTest.cpp b/examples/cppunittest/TestAssertTest.cpp index c6eb73c..05f2b25 100644 --- a/examples/cppunittest/TestAssertTest.cpp +++ b/examples/cppunittest/TestAssertTest.cpp @@ -58,6 +58,17 @@ TestAssertTest::testAssertFalse() } +static int foo() { return 1; } + + +void +TestAssertTest::testAssertEqual() +{ + CPPUNIT_ASSERT_EQUAL(1,1); + CPPUNIT_ASSERT_EQUAL( 1, foo() ); +} + + void TestAssertTest::testAssertMessageTrue() { diff --git a/examples/cppunittest/TestAssertTest.h b/examples/cppunittest/TestAssertTest.h index 718366c..d2be44b 100644 --- a/examples/cppunittest/TestAssertTest.h +++ b/examples/cppunittest/TestAssertTest.h @@ -9,6 +9,7 @@ class TestAssertTest : public CppUnit::TestCase CPPUNIT_TEST_SUITE( TestAssertTest ); CPPUNIT_TEST( testAssertTrue ); CPPUNIT_TEST( testAssertFalse ); + CPPUNIT_TEST( testAssertEqual ); CPPUNIT_TEST( testAssertMessageTrue ); CPPUNIT_TEST( testAssertMessageFalse ); CPPUNIT_TEST( testAssertDoubleEquals ); @@ -28,6 +29,8 @@ public: void testAssertTrue(); void testAssertFalse(); + void testAssertEqual(); + void testAssertMessageTrue(); void testAssertMessageFalse(); |
