CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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 
00023 
00028 template<class TestFixtureType>
00029 class ConcretTestFixtureFactory : public CPPUNIT_NS::TestFixtureFactory
00030 {
00037   TestFixture *makeFixture()
00038   {
00039     return new TestFixtureType();
00040   }
00041 };
00042 
00043 
00044 CPPUNIT_NS_END
00045 
00046 
00047 #endif // CPPUNIT_EXTENSIONS_TESTFIXTUREFACTORY_H
00048 

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers