CppUnit project page | FAQ

TextTestResult.h
Go to the documentation of this file.
1#ifndef CPPUNIT_TEXTTESTRESULT_H
2#define CPPUNIT_TEXTTESTRESULT_H
3
4#include <cppunit/TestResult.h>
5#include <cppunit/TestResultCollector.h>
6#include <cppunit/portability/Stream.h>
7
8 CPPUNIT_NS_BEGIN
9
10
11 class SourceLine;
12 class Exception;
13 class Test;
14
20 class CPPUNIT_API TextTestResult : public TestResult,
21 public TestResultCollector
22{
23 public:
24 TextTestResult();
25
26 virtual void addFailure( const TestFailure &failure );
27 virtual void startTest( Test *test );
28 virtual void print( OStream &stream );
29
30 using TestResult::addFailure;
31};
32
34 CPPUNIT_API OStream &operator <<( OStream &stream,
35 TextTestResult &result );
36
37 CPPUNIT_NS_END
38
39#endif // CPPUNIT_TEXTTESTRESULT_H
40
41
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:105
Stream.h
OStream
CPPUNIT_NS_BEGIN typedef std::ostream OStream
Definition: Stream.h:330
TestResult.h
TestResultCollector.h
operator<<
CPPUNIT_API OStream & operator<<(OStream &stream, TextTestResult &result)
insertion operator for easy output
Definition: TextTestResult.cpp:43
Exception
Exceptions thrown by failed assertions.
Definition: Exception.h:20
SourceLine
Represents a source line location.
Definition: SourceLine.h:31
TestFailure
Record of a failed Test execution.
Definition: TestFailure.h:25
Test
Base class for all test objects.
Definition: Test.h:26
TestResultCollector
Collects test result.
Definition: TestResultCollector.h:32
TestResult
Manages TestListener.
Definition: TestResult.h:48
TestResult::addFailure
virtual void addFailure(Test *test, Exception *e)
Adds a failure to the list of failures. The passed in exception caused the failure.
Definition: TestResult.cpp:51
TestResult::startTest
virtual void startTest(Test *test)
Informs TestListener that a test will be started.
Definition: TestResult.cpp:70
TextTestResult
Holds printable test result (DEPRECATED).
Definition: TextTestResult.h:22

| Send comments to: CppUnit Developers