Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

AutoTest.hh

Go to the documentation of this file.
00001 #ifndef AUTOTEST_HH
00002 #define AUTOTEST_HH
00003 
00004 #include "TestSuite.hh"
00005 
00006 namespace ccunit
00007 {
00029 class AutoTestSuite : public TestSuite
00030 {
00031 public:
00033   static AutoTestSuite &instance();
00034 
00036   virtual void Add(TestComponentPtr child);
00037 
00039   static void finish();
00040 
00041 private:
00042   // Singleton implementation - private ctor & copying, with
00043   // no implementation on the copying.
00044   AutoTestSuite();
00045   AutoTestSuite(const AutoTestSuite&); // Not implemented
00046   AutoTestSuite &operator=(const AutoTestSuite&); // Not implemented
00047 };
00048 
00050 template <class T>
00051 class registerTest
00052 {
00053 public:
00054 
00056   registerTest()
00057   {
00058     AutoTestSuite::instance().Add(TestComponentPtr(new T));
00059   }
00060 };
00061 
00062 } // namespace ccunit
00063 
00064 #endif
00065 
00066 // Local Variables:
00067 // mode: c++
00068 // End:

Generated on Tue Apr 2 15:33:22 2002 for libccunit by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002

Project hosted on sourceforge SourceForge Logo