summaryrefslogtreecommitdiff
path: root/include/cppunit/TextTestRunner.h
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-28 14:50:09 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2002-03-28 14:50:09 +0000
commit82d51cba4c7cc8d756ab14fdfc28181f007f3848 (patch)
treed28a09b421cb1802e5720cd112a577958b2c9d0f /include/cppunit/TextTestRunner.h
parent686e4865001cb14c36e8e3e81fc7c57786ff0542 (diff)
downloadcppunit-82d51cba4c7cc8d756ab14fdfc28181f007f3848.tar.gz
Doc/cookbook.
doc/cookbook.html: removed. Replaced by cookbook.doc. * doc/cookbook.dox: added, conversion of cookbook.html to Doxygen format. * doc/other_documentation.dox: added groups definition. * doc/Makefile.am: replaced cookbook.html by cookbook.dox * doc/Doxyfile.in: added predefined CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION. Replaced cookbook.html by cookbook.dox. * include/cppunitui/mfc/TestRunner.h: added, extracted from include/msvc6/testrunner/TestRunner.h. Moved class TestRunner to namespace CppUnit::MfcUi. * include/msvc6/testrunner/TestRunner.h: deprecated. A simple typedef to CppUnit::MfcUi::TestRunner. * include/textui/TestRuner.h: added, extracted from include/cppunit/TextTestRunner.h. * src/cppunit/TextTestRunner.cpp: renamed TestRunner.cpp. Moved into namespace CppUnit::TextUi. * src/msvc6/testruner/TestRunner.cpp: moved into namespace CppUnit::MfcUi. * src/cppunit/CompilerOutputter.cpp: removed printing "- " before NotEqualException addional message, for consistency between different TestRunner (Mfc,Text...) * include/cppunit/Asserter.h: * include/cppunit/CompilerOutputter.h: * include/cppunit/Exception.h: * include/cppunit/NotEqualException.h: * include/cppunit/Outputter.h: * include/cppunit/SourceLine.h: * include/cppunit/TestAssert.h: * include/cppunit/TestCaller.h: * include/cppunit/TestFailure.h: * include/cppunit/TestFixture.h: * include/cppunit/TestListener.h: * include/cppunit/TestResult.h: * include/cppunit/TestResultCollector.h: * include/cppunit/TestSucessListener.h: * include/cppunit/TestSuite.h: * include/cppunit/TextTestProgressListener.h: * include/cppunit/TextTestRunner.h: * include/cppunit/XmlOutputter.h: * include/cppunit/extensions/AutoRegisterSuite.h: * include/cppunit/extensions/HelperMacros.h: * include/cppunit/extensions/TestFactoryRegistry.h: * include/cppunit/extensions/TestSuiteBuilder.h: * include/cppunit/extensions/TestSuiteFactory.h: doc update. organization in groups. * examples/msvc6/CppUnitTestApp/CppUnitTestApp.cpp: * examples/msvc6/HostApp/HostApp.cpp: updated to use CppUnit::MfcUi::TestRunner. * examples/cppunittest/CppUnitTestMain.cpp: updated to use CppUnit::TextUi::TestRunner.
Diffstat (limited to 'include/cppunit/TextTestRunner.h')
-rw-r--r--include/cppunit/TextTestRunner.h85
1 files changed, 4 insertions, 81 deletions
diff --git a/include/cppunit/TextTestRunner.h b/include/cppunit/TextTestRunner.h
index 0d7a138..f7c5fa0 100644
--- a/include/cppunit/TextTestRunner.h
+++ b/include/cppunit/TextTestRunner.h
@@ -1,93 +1,16 @@
#ifndef CPPUNIT_TEXTTESTRUNNER_H
#define CPPUNIT_TEXTTESTRUNNER_H
-#include <string>
-#include <vector>
+#include <cppunitui/text/TestRunner.h>
namespace CppUnit {
-class Outputter;
-class Test;
-class TestSuite;
-class TextOutputter;
-class TestResult;
-class TestResultCollector;
-
/*!
* \brief A text mode test runner.
- *
- * 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.
- *
- * TextTestRunner 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::TextTestRunner 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::TextTestRunner 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.
+ * \ingroup ExecutingTest
+ * \deprecated Use CppUnit::TextUi::TestRunner instead.
*/
-class CPPUNIT_API TextTestRunner
-{
-public:
- TextTestRunner( Outputter *outputter =NULL );
-
- virtual ~TextTestRunner();
-
- bool run( std::string testName ="",
- bool wait = false,
- bool printResult = true,
- bool printProgress = true );
-
- void addTest( Test *test );
-
- void setOutputter( Outputter *outputter );
-
- TestResultCollector &result() const;
-
- TestResult &eventManager() const;
-
-protected:
- virtual bool runTest( Test *test,
- bool printTextProgress );
- virtual bool runTestByName( std::string testName,
- bool printProgress );
- virtual void wait( bool doWait );
- virtual void printResult( bool doPrintResult );
-
- virtual Test *findTestByName( std::string name ) const;
-
- TestSuite *m_suite;
- TestResultCollector *m_result;
- TestResult *m_eventManager;
- Outputter *m_outputter;
-};
+typedef CppUnit::TextUi::TestRunner TextTestRunner;
} // namespace CppUnit