1 #ifndef CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
2 #define CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
4 #include <cppunit/Portability.h>
12 /*! \brief Abstract TestFixture factory (Implementation).
14 * Implementation detail. Use by HelperMacros to handle TestFixture hierarchy.
16 class TestFixtureFactory
19 //! Creates a new TestFixture instance.
20 virtual TestFixture *makeFixture() =0;
22 virtual ~TestFixtureFactory() {}
26 /*! \brief Concret TestFixture factory (Implementation).
28 * Implementation detail. Use by HelperMacros to handle TestFixture hierarchy.
30 template<class TestFixtureType>
31 class ConcretTestFixtureFactory : public CPPUNIT_NS::TestFixtureFactory
33 /*! \brief Returns a new TestFixture instance.
34 * \return A new fixture instance. The fixture instance is returned by
35 * the TestFixtureFactory passed on construction. The actual type
36 * is that of the fixture on which the static method suite()
39 TestFixture *makeFixture()
41 return new TestFixtureType();
49 #endif // CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H