diff options
author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-11 18:56:23 +0000 |
---|---|---|
committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-11 18:56:23 +0000 |
commit | 0c5051a8acf83fd77a6094177eb0711d3f90d997 (patch) | |
tree | a0757b1cae952576f4497d40ccf3aa70a2bf84c8 /examples/cppunittest/TestAssertTest.h | |
parent | 021d0a2611777a06d948735e0ad36cb90ffd413b (diff) | |
download | cppunit-0c5051a8acf83fd77a6094177eb0711d3f90d997.tar.gz |
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.
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 |