CppUnit project page FAQ CppUnit home page

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>
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 
14 
15 
16 class Exception;
17 class SourceLine;
18 class Test;
19 class TestFailure;
21 
61 {
62 public:
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 &copy );
131 
133  void operator =( const CompilerOutputter &copy );
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:
143  std::string m_locationFormat;
145 };
146 
147 
149 
150 #if CPPUNIT_NEED_DLL_DECL
151 #pragma warning( pop )
152 #endif
153 
154 #endif // CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers