CppUnit project page | FAQ

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

- File List
- File Members

ui/text/TextTestRunner.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H
2 #define CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H
3
4
5 #include <cppunit/Portability.h>
6 #include <string>
7 #include <cppunit/TestRunner.h>
8
9 CPPUNIT_NS_BEGIN
10
11
12 class Outputter;
13 class Test;
14 class TestSuite;
15 class TextOutputter;
16 class TestResult;
17 class TestResultCollector;
18
19
20
63 class CPPUNIT_API TextTestRunner : public CPPUNIT_NS::TestRunner
64 {
65 public:
66 TextTestRunner( Outputter *outputter =NULL );
67
68 virtual ~TextTestRunner();
69
70 bool run( std::string testPath ="",
71 bool doWait = false,
72 bool doPrintResult = true,
73 bool doPrintProgress = true );
74
75 void setOutputter( Outputter *outputter );
76
77 TestResultCollector &result() const;
78
79 TestResult &eventManager() const;
80
81 public: // overridden from TestRunner (to avoid hidden virtual function warning)
82 virtual void run( TestResult &controller,
83 const std::string &testPath = "" );
84
85 protected:
86 virtual void wait( bool doWait );
87 virtual void printResult( bool doPrintResult );
88
89 TestResultCollector *m_result;
90 TestResult *m_eventManager;
91 Outputter *m_outputter;
92 };
93
94
95 CPPUNIT_NS_END
96
97 #endif // CPPUNIT_UI_TEXT_TEXTTESTRUNNER_H
TestResult
Manages TestListener.A single instance of this class is used when running the test. It is usually created by the test runner (TestRunner).
Definition: TestResult.h:51
Portability.h
TextTestRunner::m_result
TestResultCollector * m_result
Definition: ui/text/TextTestRunner.h:89
Test
Base class for all test objects.All test objects should be a subclass of Test. Some test objects...
Definition: Test.h:25
TextOutputter
Prints a TestResultCollector to a text stream.
Definition: TextOutputter.h:20
TextTestRunner
A text mode test runner.The test runner manage the life cycle of the added tests. ...
Definition: ui/text/TextTestRunner.h:63
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
TestResultCollector
Collects test result.A TestResultCollector is a TestListener which collects the results of executing ...
Definition: TestResultCollector.h:36
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
TestRunner.h
Outputter
Abstract outputter to print test result summary.
Definition: Outputter.h:13
TestRunner
CPPUNIT_NS::MfcTestRunner TestRunner
MFC test runner (DEPRECATED)
Definition: msvc6/testrunner/TestRunner.h:15
TestSuite
A Composite of Tests.It runs a collection of test cases. Here is an example.
Definition: TestSuite.h:40
TextTestRunner::m_outputter
Outputter * m_outputter
Definition: ui/text/TextTestRunner.h:91
TextTestRunner::m_eventManager
TestResult * m_eventManager
Definition: ui/text/TextTestRunner.h:90
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| Send comments to: CppUnit Developers