I have the following class structure, which I would like to test:
class A; // abstract base class
template<class SomeDataType>
class B : public A; // still abstract
class C : public B<DataType>;
class D1 : public C;
class D2 : public C;
Naturally, I would create test classes such as TestA, TestB, TestC, TestD1, and TestD2, with corresponding inheritance relation. However, it seems to be difficult to use the Helper Macros to define the "test suite" that each of the classes provides. Does anyone have an idea about how to easily augment the suite of TestA from within TestB (or any of the others)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the following class structure, which I would like to test:
class A; // abstract base class
template<class SomeDataType>
class B : public A; // still abstract
class C : public B<DataType>;
class D1 : public C;
class D2 : public C;
Naturally, I would create test classes such as TestA, TestB, TestC, TestD1, and TestD2, with corresponding inheritance relation. However, it seems to be difficult to use the Helper Macros to define the "test suite" that each of the classes provides. Does anyone have an idea about how to easily augment the suite of TestA from within TestB (or any of the others)?
Well, I just use the CPPUNIT_TEST_SUB_SUITE macro instead of CPPUNIT_TEST_SUITE.