From 0c5051a8acf83fd77a6094177eb0711d3f90d997 Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Mon, 11 Jun 2001 18:56:23 +0000 Subject: Examples/cppunittest/TestResultTest. examples/cppunittest/TestResultTest.*: renamed TestListenerTest.* * examples/cppunittest/*: added unit tests for: HelperMacros, TestAssert, TestCaller, TestCase, TestFailure, TestResult, TestSuite, TestDecoratorTest, TestSetUp, RepeatedTestTest, Orthodox, Exception. --- examples/cppunittest/TestAssertTest.h | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 examples/cppunittest/TestAssertTest.h (limited to 'examples/cppunittest/TestAssertTest.h') diff --git a/examples/cppunittest/TestAssertTest.h b/examples/cppunittest/TestAssertTest.h new file mode 100644 index 0000000..718366c --- /dev/null +++ b/examples/cppunittest/TestAssertTest.h @@ -0,0 +1,51 @@ +#ifndef TESTASSERTTEST_H +#define TESTASSERTTEST_H + +#include + + +class TestAssertTest : public CppUnit::TestCase +{ + CPPUNIT_TEST_SUITE( TestAssertTest ); + CPPUNIT_TEST( testAssertTrue ); + CPPUNIT_TEST( testAssertFalse ); + CPPUNIT_TEST( testAssertMessageTrue ); + CPPUNIT_TEST( testAssertMessageFalse ); + CPPUNIT_TEST( testAssertDoubleEquals ); + CPPUNIT_TEST( testAssertDoubleNotEquals ); + CPPUNIT_TEST( testAssertLongEquals ); + CPPUNIT_TEST( testAssertLongNotEquals ); + CPPUNIT_TEST_SUITE_END(); + +public: + TestAssertTest(); + + virtual ~TestAssertTest(); + + virtual void setUp(); + virtual void tearDown(); + + void testAssertTrue(); + void testAssertFalse(); + + void testAssertMessageTrue(); + void testAssertMessageFalse(); + + void testAssertDoubleEquals(); + void testAssertDoubleNotEquals(); + + void testAssertLongEquals(); + void testAssertLongNotEquals(); + +private: + TestAssertTest( const TestAssertTest © ); + void operator =( const TestAssertTest © ); + + void checkDoubleNotEquals( double expected, + double actual, + double delta ); + +private: +}; + +#endif // TESTASSERTTEST_H -- cgit v1.2.1