diff options
Diffstat (limited to 'include/cppunit/ui/text/TestRunner.h')
| -rw-r--r-- | include/cppunit/ui/text/TestRunner.h | 88 |
1 files changed, 3 insertions, 85 deletions
diff --git a/include/cppunit/ui/text/TestRunner.h b/include/cppunit/ui/text/TestRunner.h index 13bb8b0..c931f66 100644 --- a/include/cppunit/ui/text/TestRunner.h +++ b/include/cppunit/ui/text/TestRunner.h @@ -1,100 +1,18 @@ #ifndef CPPUNIT_UI_TEXT_TESTRUNNER_H #define CPPUNIT_UI_TEXT_TESTRUNNER_H -// Notes: this class is implemented in TextTestRunner.cpp. - -#include <cppunit/Portability.h> -#include <string> -#include <vector> -#include <cppunit/TestRunner.h> +#include <cppunit/ui/text/TextTestRunner.h> CPPUNIT_NS_BEGIN -class Outputter; -class Test; -class TestSuite; -class TextOutputter; -class TestResult; -class TestResultCollector; - -namespace TextUi -{ - /*! * \brief A text mode test runner. - * \ingroup WritingTestResult * \ingroup ExecutingTest - * - * The test runner manage the life cycle of the added tests. - * - * The test runner can run only one of the added tests or all the tests. - * - * TestRunner prints out a trace as the tests are executed followed by a - * summary at the end. The trace and summary print are optional. - * - * Here is an example of use: - * - * \code - * CppUnit::TextUi::TestRunner runner; - * runner.addTest( ExampleTestCase::suite() ); - * runner.run( "", true ); // Run all tests and wait - * \endcode - * - * The trace is printed using a TextTestProgressListener. The summary is printed - * using a TextOutputter. - * - * You can specify an alternate Outputter at construction - * or later with setOutputter(). - * - * After construction, you can register additional TestListener to eventManager(), - * for a custom progress trace, for example. - * - * \code - * CppUnit::TextUi::TestRunner runner; - * runner.addTest( ExampleTestCase::suite() ); - * runner.setOutputter( CppUnit::CompilerOutputter::defaultOutputter( - * &runner.result(), - * std::cerr ) ); - * MyCustomProgressTestListener progress; - * runner.eventManager().addListener( &progress ); - * runner.run( "", true ); // Run all tests and wait - * \endcode - * - * \see CompilerOutputter, XmlOutputter, TextOutputter. + * \deprecated Use CppUnit::TextUi::TestRunner instead. */ -class CPPUNIT_API TestRunner : public CPPUNIT_NS(TestRunner) -{ -public: - // Work around VC++ bug (class has same name as parent) - typedef CPPUNIT_NS(TestRunner) SuperClass; - - TestRunner( Outputter *outputter =NULL ); - - virtual ~TestRunner(); - - bool run( std::string testPath ="", - bool doWait = false, - bool doPrintResult = true, - bool doPrintProgress = true ); - - void setOutputter( Outputter *outputter ); - - TestResultCollector &result() const; - - TestResult &eventManager() const; - -protected: - virtual void wait( bool doWait ); - virtual void printResult( bool doPrintResult ); - - TestResultCollector *m_result; - TestResult *m_eventManager; - Outputter *m_outputter; -}; - +typedef CPPUNIT_NS::TextUi::TestRunner TextTestRunner; -} // namespace TextUi CPPUNIT_NS_END |
