CppUnit project page | FAQ

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

- File List
- File Members

TestListener.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TESTLISTENER_H // -*- C++ -*-
2 #define CPPUNIT_TESTLISTENER_H
3
4 #include <cppunit/Portability.h>
5
6
7 CPPUNIT_NS_BEGIN
8
9
10 class Exception;
11 class Test;
12 class TestFailure;
13 class TestResult;
14
15
94 class CPPUNIT_API TestListener
95 {
96 public:
97 virtual ~TestListener() {}
98
100 virtual void startTest( Test * /*test*/ ) {}
101
107 virtual void addFailure( const TestFailure & /*failure*/ ) {}
108
110 virtual void endTest( Test * /*test*/ ) {}
111
114 virtual void startSuite( Test * /*suite*/ ) {}
115
118 virtual void endSuite( Test * /*suite*/ ) {}
119
128 virtual void startTestRun( Test * /*test*/,
129 TestResult * /*eventManager*/ ) {}
130
139 virtual void endTestRun( Test * /*test*/,
140 TestResult * /*eventManager*/ ) {}
141 };
142
143
144 CPPUNIT_NS_END
145
146 #endif // CPPUNIT_TESTLISTENER_H
147
148
Exception
Exceptions thrown by failed assertions.Exception is an exception that serves descriptive strings thro...
Definition: Exception.h:19
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
TestListener::endTestRun
virtual void endTestRun(Test *, TestResult *)
Called by a TestRunner after running the test.
Definition: TestListener.h:139
TestListener::addFailure
virtual void addFailure(const TestFailure &)
Called when a failure occurs while running a test.
Definition: TestListener.h:107
Test
Base class for all test objects.All test objects should be a subclass of Test. Some test objects...
Definition: Test.h:25
TestListener::startTestRun
virtual void startTestRun(Test *, TestResult *)
Called by a TestRunner before running the test.
Definition: TestListener.h:128
TestFailure
Record of a failed Test execution.A TestFailure collects a failed test together with the caught excep...
Definition: TestFailure.h:24
TestListener::~TestListener
virtual ~TestListener()
Definition: TestListener.h:97
TestListener::endTest
virtual void endTest(Test *)
Called just after a TestCase was run (even if a failure occured).
Definition: TestListener.h:110
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
TestListener::startSuite
virtual void startSuite(Test *)
Called by a TestComposite just before running its child tests.
Definition: TestListener.h:114
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
TestListener::endSuite
virtual void endSuite(Test *)
Called by a TestComposite after running its child tests.
Definition: TestListener.h:118
TestListener
Listener for test progress and result.Implementing the Observer pattern a TestListener may be registe...
Definition: TestListener.h:94
TestListener::startTest
virtual void startTest(Test *)
Called when just before a TestCase is run.
Definition: TestListener.h:100
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| Send comments to: CppUnit Developers