CppUnit - The Unit Testing Library

CppUnit project page | FAQ

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
10class Exception;
11class Test;
12class TestFailure;
13class TestResult;
14
15
94 class CPPUNIT_API TestListener
95{
96public:
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
CPPUNIT_API
#define CPPUNIT_API
Definition CppUnitApi.h:27
Portability.h
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
Exception
Exceptions thrown by failed assertions.
Definition Exception.h:20
TestFailure
Record of a failed Test execution.
Definition TestFailure.h:25
Test
Base class for all test objects.
Definition Test.h:26
TestListener
Listener for test progress and result.
Definition TestListener.h:95
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
TestListener::startSuite
virtual void startSuite(Test *)
Called by a TestComposite just before running its child tests.
Definition TestListener.h:114
TestListener::startTestRun
virtual void startTestRun(Test *, TestResult *)
Called by a TestRunner before running the test.
Definition TestListener.h:128
TestListener::startTest
virtual void startTest(Test *)
Called when just before a TestCase is run.
Definition TestListener.h:100
TestListener::endSuite
virtual void endSuite(Test *)
Called by a TestComposite after running its child tests.
Definition TestListener.h:118
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
TestResult
Manages TestListener.
Definition TestResult.h:48

| Send comments to: CppUnit Developers