1 #ifndef SUBCLASSEDTESTCASE_H 2 #define SUBCLASSEDTESTCASE_H 3 4 #include "BaseTestCase.h" 5 6 7 class SubclassedTestCase : public BaseTestCase 8 { 9 CPPUNIT_TEST_SUB_SUITE( SubclassedTestCase, BaseTestCase ); 10 CPPUNIT_TEST( testSubclassing ); 11 CPPUNIT_TEST_SUITE_END(); 12 13 public: 14 SubclassedTestCase(); 15 virtual ~SubclassedTestCase(); 16 17 virtual void setUp(); 18 virtual void tearDown(); 19 20 // Another test to ensure the subclassed test case are in the suite . 21 void testSubclassing(); 22 23 protected: 24 // We overload this method to ensure that the testUsingCheckIt in the 25 // parent class will fail. 26 virtual void checkIt(); 27 28 private: 29 SubclassedTestCase( const SubclassedTestCase © ); 30 void operator =( const SubclassedTestCase © ); 31 }; 32 33 34 35 #endif // SUBCLASSEDTESTCASE_H 36