diff options
Diffstat (limited to 'examples/cppunittest/TestAssertTest.h')
-rw-r--r-- | examples/cppunittest/TestAssertTest.h | 51 |
1 files changed, 51 insertions, 0 deletions
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 <cppunit/extensions/HelperMacros.h> + + +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 |