CppUnit project page
FAQ
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
cppunit
CompilerOutputter.h
Go to the documentation of this file.
1
#ifndef CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H
2
#define CPPUNIT_COMPILERTESTRESULTOUTPUTTER_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
11
class
Exception
;
12
class
SourceLine
;
13
class
Test
;
14
class
TestFailure
;
15
class
TestResultCollector
;
16
55
class
CPPUNIT_API
CompilerOutputter
:
public
Outputter
56
{
57
public
:
66
CompilerOutputter
(
TestResultCollector
*result,
67
OStream
&stream,
68
const
std::string &locationFormat =
CPPUNIT_COMPILER_LOCATION_FORMAT
);
69
71
virtual
~
CompilerOutputter
();
72
96
void
setLocationFormat(
const
std::string &locationFormat );
97
102
static
CompilerOutputter
*defaultOutputter(
TestResultCollector
*result,
103
OStream
&stream );
104
105
void
write
();
106
107
void
setNoWrap();
108
109
void
setWrapColumn(
int
wrapColumn );
110
111
int
wrapColumn()
const
;
112
113
virtual
void
printSuccess();
114
virtual
void
printFailureReport();
115
virtual
void
printFailuresList();
116
virtual
void
printStatistics();
117
virtual
void
printFailureDetail(
TestFailure
*failure );
118
virtual
void
printFailureLocation(
SourceLine
sourceLine );
119
virtual
void
printFailureType(
TestFailure
*failure );
120
virtual
void
printFailedTestName(
TestFailure
*failure );
121
virtual
void
printFailureMessage(
TestFailure
*failure );
122
123
private
:
125
CompilerOutputter
(
const
CompilerOutputter
© );
126
128
void
operator =(
const
CompilerOutputter
© );
129
130
virtual
bool
processLocationFormatCommand(
char
command,
131
const
SourceLine
&sourceLine );
132
133
virtual
std::string extractBaseName(
const
std::string &fileName )
const
;
134
135
private
:
136
TestResultCollector
*
m_result
;
137
OStream
&
m_stream
;
138
std::string
m_locationFormat
;
139
int
m_wrapColumn
;
140
};
141
142
143
CPPUNIT_NS_END
144
145
146
#endif // CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H
Send comments to:
CppUnit Developers