summaryrefslogtreecommitdiff
path: root/examples/cppunittest/TestAssertTest.cpp
diff options
context:
space:
mode:
authorSteve M. Robbins <smr@sumost.ca>2007-01-27 14:50:11 +0000
committerSteve M. Robbins <smr@sumost.ca>2007-01-27 14:50:11 +0000
commit92e722a21bb507165d4895c9a9aa92e53a1241ec (patch)
treecedc2ccf418f42ef5e1c5ffab92125449e6b05dc /examples/cppunittest/TestAssertTest.cpp
parent50c65db468b6d10ad8fb42b50e7ea87367c21309 (diff)
downloadcppunit-92e722a21bb507165d4895c9a9aa92e53a1241ec.tar.gz
Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and testAssertDoubleNotEquals2.
* examples/cppunittest/TestAssertTest.cpp: * examples/cppunittest/TestAssertTest.h: Remove declaration of unimplemented functions testAssertDoubleNotEquals1 and testAssertDoubleNotEquals2. Factor new method testAssertDoubleNonFinite out of existing testAssertDoubleEquals.
Diffstat (limited to 'examples/cppunittest/TestAssertTest.cpp')
-rw-r--r--examples/cppunittest/TestAssertTest.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/cppunittest/TestAssertTest.cpp b/examples/cppunittest/TestAssertTest.cpp
index 6941901..8719440 100644
--- a/examples/cppunittest/TestAssertTest.cpp
+++ b/examples/cppunittest/TestAssertTest.cpp
@@ -171,7 +171,11 @@ TestAssertTest::testAssertDoubleEquals()
CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.1, 1.2, 0.09 ) );
CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 1.2, 1.1, 0.09 ) );
+}
+void
+TestAssertTest::testAssertDoubleNonFinite()
+{
double inf = std::numeric_limits<double>::infinity();
CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( inf, 0.0, 1.0 ) );
CPPUNIT_ASSERT_ASSERTION_FAIL( CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.0, inf, 1.0 ) );