TestSuiteFactory.h 529 B

123456789101112131415161718192021222324252627
  1. #ifndef CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H
  2. #define CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H
  3. #include <cppunit/extensions/TestFactory.h>
  4. CPPUNIT_NS_BEGIN
  5. class Test;
  6. /*! \brief TestFactory for TestFixture that implements a static suite() method.
  7. * \see AutoRegisterSuite.
  8. */
  9. template<class TestCaseType>
  10. class TestSuiteFactory : public TestFactory
  11. {
  12. public:
  13. virtual Test *makeTest()
  14. {
  15. return TestCaseType::suite();
  16. }
  17. };
  18. CPPUNIT_NS_END
  19. #endif // CPPUNIT_EXTENSIONS_TESTSUITEFACTORY_H