CppUnit project page
FAQ
CppUnit home page
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
#if CPPUNIT_NEED_DLL_DECL
9
#pragma warning( push )
10
#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
11
#endif
12
13
CPPUNIT_NS_BEGIN
14
15
16
class
Exception
;
17
class
SourceLine
;
18
class
Test
;
19
class
TestFailure
;
20
class
TestResultCollector
;
21
60
class
CPPUNIT_API
CompilerOutputter
:
public
Outputter
61
{
62
public
:
71
CompilerOutputter
(
TestResultCollector
*result,
72
OStream
&stream,
73
const
std::string &locationFormat =
CPPUNIT_COMPILER_LOCATION_FORMAT
);
74
76
virtual
~
CompilerOutputter
();
77
101
void
setLocationFormat(
const
std::string &locationFormat );
102
107
static
CompilerOutputter
*defaultOutputter(
TestResultCollector
*result,
108
OStream
&stream );
109
110
void
write
();
111
112
void
setNoWrap();
113
114
void
setWrapColumn(
int
wrapColumn );
115
116
int
wrapColumn()
const
;
117
118
virtual
void
printSuccess();
119
virtual
void
printFailureReport();
120
virtual
void
printFailuresList();
121
virtual
void
printStatistics();
122
virtual
void
printFailureDetail(
TestFailure
*failure );
123
virtual
void
printFailureLocation(
SourceLine
sourceLine );
124
virtual
void
printFailureType(
TestFailure
*failure );
125
virtual
void
printFailedTestName(
TestFailure
*failure );
126
virtual
void
printFailureMessage(
TestFailure
*failure );
127
128
private
:
130
CompilerOutputter
(
const
CompilerOutputter
© );
131
133
void
operator =(
const
CompilerOutputter
© );
134
135
virtual
bool
processLocationFormatCommand(
char
command,
136
const
SourceLine
&sourceLine );
137
138
virtual
std::string extractBaseName(
const
std::string &fileName )
const
;
139
140
private
:
141
TestResultCollector
*
m_result
;
142
OStream
&
m_stream
;
143
std::string
m_locationFormat
;
144
int
m_wrapColumn
;
145
};
146
147
148
CPPUNIT_NS_END
149
150
#if CPPUNIT_NEED_DLL_DECL
151
#pragma warning( pop )
152
#endif
153
154
#endif // CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H
hosts this site.
Send comments to:
CppUnit Developers