CppUnit project page | FAQ | CppUnit home page

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

- File List
- File Members

TestRunner.h
Go to the documentation of this file.

    00001 #ifndef CPPUNIT_TESTRUNNER_H
    00002 #define CPPUNIT_TESTRUNNER_H
    00003
    00004 #include <cppunit/TestSuite.h>
    00005 #include <string>
    00006
    00007 CPPUNIT_NS_BEGIN
    00008
    00009
    00010 class Test;
    00011 class TestResult;
    00012
    00013
    00072 class CPPUNIT_API TestRunner
    00073 {
    00074 public:
    00077   TestRunner(  );
    00078
    00080   virtual ~TestRunner();
    00081
    00085   virtual void addTest( Test *test );
    00086
    00094   virtual void run( TestResult &controller,
    00095                     const std::string &testPath = "" );
    00096
    00097 protected:
    00100   class CPPUNIT_API WrappingSuite : public TestSuite
    00101   {
    00102   public:
    00103     WrappingSuite( const std::string &name = "All Tests" );
    00104
    00105     int getChildTestCount() const;
    00106
    00107     std::string getName() const;
    00108
    00109     void run( TestResult *result );
    00110
    00111   protected:
    00112     Test *doGetChildTestAt( int index ) const;
    00113
    00114     bool hasOnlyOneTest() const;
    00115
    00116     Test *getUniqueChildTest() const;
    00117   };
    00118
    00119 protected:
    00120   WrappingSuite *m_suite;
    00121
    00122 private:
    00124   TestRunner( const TestRunner &copy );
    00125
    00127   void operator =( const TestRunner &copy );
    00128
    00129 private:
    00130 };
    00131
    00132
    00133 CPPUNIT_NS_END
    00134
    00135 #endif  // CPPUNIT_TESTRUNNER_H

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