summaryrefslogtreecommitdiff
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
parent50c65db468b6d10ad8fb42b50e7ea87367c21309 (diff)
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.
-rw-r--r--ChangeLog6
-rw-r--r--examples/cppunittest/TestAssertTest.cpp4
-rw-r--r--examples/cppunittest/TestAssertTest.h4
3 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6977919..4f48ead 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2007-01-27 Steve M. Robbins <smr@sumost.ca>
+ * examples/cppunittest/TestAssertTest.cpp:
+ * examples/cppunittest/TestAssertTest.h: Remove declaration of
+ unimplemented functions testAssertDoubleNotEquals1 and
+ testAssertDoubleNotEquals2. Factor new method
+ testAssertDoubleNonFinite out of existing testAssertDoubleEquals.
+
* src/cppunit/Win32DynamicLibraryManager.cpp (doLoadLibrary):
Unconditionally use ANSI version of LoadLibrary() and other
functions with string arguments.
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 ) );
diff --git a/examples/cppunittest/TestAssertTest.h b/examples/cppunittest/TestAssertTest.h
index 636cb3a..a024573 100644
--- a/examples/cppunittest/TestAssertTest.h
+++ b/examples/cppunittest/TestAssertTest.h
@@ -16,6 +16,7 @@ class TestAssertTest : public CPPUNIT_NS::TestFixture
CPPUNIT_TEST( testAssertMessageTrue );
CPPUNIT_TEST( testAssertMessageFalse );
CPPUNIT_TEST( testAssertDoubleEquals );
+ CPPUNIT_TEST( testAssertDoubleNonFinite );
CPPUNIT_TEST( testFail );
CPPUNIT_TEST_SUITE_END();
@@ -42,8 +43,7 @@ public:
void testAssertMessageFalse();
void testAssertDoubleEquals();
- void testAssertDoubleNotEquals1();
- void testAssertDoubleNotEquals2();
+ void testAssertDoubleNonFinite();
void testAssertLongEquals();
void testAssertLongNotEquals();