CppUnit - The Unit Testing Library

CppUnit project page | FAQ

TextOutputter.h
Go to the documentation of this file.
1#ifndef CPPUNIT_TEXTOUTPUTTER_H
2#define CPPUNIT_TEXTOUTPUTTER_H
3
4#include <cppunit/Portability.h>
5#include <cppunit/Outputter.h>
6#include <cppunit/portability/Stream.h>
7
8 CPPUNIT_NS_BEGIN
9
10
11class Exception;
12class SourceLine;
13class TestResultCollector;
14class TestFailure;
15
16
20 class CPPUNIT_API TextOutputter : public Outputter
21{
22public:
23 TextOutputter( TestResultCollector *result,
24 OStream &stream );
25
27 virtual ~TextOutputter();
28
29 void write();
30 virtual void printFailures();
31 virtual void printHeader();
32
33 virtual void printFailure( TestFailure *failure,
34 int failureNumber );
35 virtual void printFailureListMark( int failureNumber );
36 virtual void printFailureTestName( TestFailure *failure );
37 virtual void printFailureType( TestFailure *failure );
38 virtual void printFailureLocation( SourceLine sourceLine );
39 virtual void printFailureDetail( Exception *thrownException );
40 virtual void printFailureWarning();
41 virtual void printStatistics();
42
43protected:
44 TestResultCollector *m_result;
45 OStream &m_stream;
46
47private:
49 TextOutputter( const TextOutputter &copy );
50
52 void operator =( const TextOutputter &copy );
53};
54
55
56
57 CPPUNIT_NS_END
58
59#endif // CPPUNIT_TEXTOUTPUTTER_H
CPPUNIT_API
#define CPPUNIT_API
Definition CppUnitApi.h:27
Outputter.h
Portability.h
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
Exception
Exceptions thrown by failed assertions.
Definition Exception.h:20
Outputter
Abstract outputter to print test result summary.
Definition Outputter.h:14
Outputter::write
virtual void write()=0
SourceLine
Represents a source line location.
Definition SourceLine.h:31
TestFailure
Record of a failed Test execution.
Definition TestFailure.h:25
TestResultCollector
Collects test result.
Definition TestResultCollector.h:32
TextOutputter::printFailureLocation
virtual void printFailureLocation(SourceLine sourceLine)
Definition TextOutputter.cpp:88
TextOutputter::printFailureListMark
virtual void printFailureListMark(int failureNumber)
Definition TextOutputter.cpp:65
TextOutputter::printFailureTestName
virtual void printFailureTestName(TestFailure *failure)
Definition TextOutputter.cpp:72
TextOutputter::m_result
TestResultCollector * m_result
Definition TextOutputter.h:44
TextOutputter::TextOutputter
TextOutputter(const TextOutputter &copy)
Prevents the use of the copy constructor.
TextOutputter::printFailure
virtual void printFailure(TestFailure *failure, int failureNumber)
Definition TextOutputter.cpp:48
TextOutputter::m_stream
OStream & m_stream
Definition TextOutputter.h:45
TextOutputter::printFailureDetail
virtual void printFailureDetail(Exception *thrownException)
Definition TextOutputter.cpp:99
TextOutputter::printHeader
virtual void printHeader()
Definition TextOutputter.cpp:107
TextOutputter::printFailureWarning
virtual void printFailureWarning()
Definition TextOutputter.cpp:121
TextOutputter::TextOutputter
TextOutputter(TestResultCollector *result, OStream &stream)
Definition TextOutputter.cpp:11
TextOutputter::printFailureType
virtual void printFailureType(TestFailure *failure)
Definition TextOutputter.cpp:79
TextOutputter::printFailures
virtual void printFailures()
Definition TextOutputter.cpp:35
TextOutputter::printStatistics
virtual void printStatistics()
Definition TextOutputter.cpp:128

| Send comments to: CppUnit Developers