CppUnit project page | FAQ | CppUnit home page

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

TestFixtureFactory.h
Go to the documentation of this file.

    00001 #ifndef CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
    00002 #define CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
    00003
    00004 #include <cppunit/Portability.h>
    00005
    00006
    00007 CPPUNIT_NS_BEGIN
    00008
    00009
    00010 class TestFixture;
    00011
    00016 class TestFixtureFactory
    00017 {
    00018 public:
    00020   virtual TestFixture *makeFixture() =0;
    00021
    00022   virtual ~TestFixtureFactory() {}
    00023 };
    00024
    00025
    00030 template<class TestFixtureType>
    00031 class ConcretTestFixtureFactory : public CPPUNIT_NS::TestFixtureFactory
    00032 {
    00039   TestFixture *makeFixture()
    00040   {
    00041     return new TestFixtureType();
    00042   }
    00043 };
    00044
    00045
    00046 CPPUNIT_NS_END
    00047
    00048
    00049 #endif // CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
    00050

| hosts this site. |  | Send comments to: CppUnit Developers