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

Test.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_TEST_H
00002 #define CPPUNIT_TEST_H
00003 
00004 #include <cppunit/Portability.h>
00005 #include <string>
00006 
00007 CPPUNIT_NS_BEGIN
00008 
00009 
00010 class TestResult;
00011 class TestPath;
00012 
00025 class CPPUNIT_API Test
00026 {
00027 public:
00028   virtual ~Test() {};
00029 
00032   virtual void run( TestResult *result ) =0;
00033 
00040   virtual int countTestCases () const =0;
00041 
00044   virtual int getChildTestCount() const =0;
00045 
00057   virtual Test *getChildTestAt( int index ) const;
00058 
00064   virtual std::string getName () const =0;
00065 
00072   virtual bool findTestPath( const std::string &testName,
00073                              TestPath &testPath ) const;
00074 
00081   virtual bool findTestPath( const Test *test,
00082                              TestPath &testPath ) const;
00083 
00089   virtual Test *findTest( const std::string &testName ) const;
00090 
00097   virtual TestPath resolveTestPath( const std::string &testPath ) const;
00098 
00099 protected:
00104   virtual void checkIsValidIndex( int index ) const;
00105 
00110   virtual Test *doGetChildTestAt( int index ) const =0;
00111 };
00112 
00113 
00114 CPPUNIT_NS_END
00115 
00116 #endif // CPPUNIT_TEST_H
00117 

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