diff options
Diffstat (limited to 'examples/cppunittest/HelperMacrosTest.h')
-rw-r--r-- | examples/cppunittest/HelperMacrosTest.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/cppunittest/HelperMacrosTest.h b/examples/cppunittest/HelperMacrosTest.h new file mode 100644 index 0000000..c9d33a7 --- /dev/null +++ b/examples/cppunittest/HelperMacrosTest.h @@ -0,0 +1,39 @@ +#ifndef HELPERMACROSTEST_H +#define HELPERMACROSTEST_H + +#include <cppunit/extensions/HelperMacros.h> + + +class HelperMacrosTest : public CppUnit::TestCase +{ + CPPUNIT_TEST_SUITE( HelperMacrosTest ); + CPPUNIT_TEST( testNoSubclassing ); + CPPUNIT_TEST( testSubclassing ); + CPPUNIT_TEST_SUITE_END(); + +public: + HelperMacrosTest(); + virtual ~HelperMacrosTest(); + + virtual void setUp(); + virtual void tearDown(); + + void testNoSubclassing(); + + void testSubclassing(); + +private: + HelperMacrosTest( const HelperMacrosTest © ); + void operator =( const HelperMacrosTest © ); + + void checkTestResult( int expectedFailures, + int expectedErrors, + int expectedTestsRun ); + +private: + CppUnit::TestResult *m_result; +}; + + + +#endif // HELPERMACROSTEST_H |