CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CompilerOutputter.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H
00002 #define CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H
00003 
00004 #include <cppunit/Portability.h>
00005 #include <cppunit/Outputter.h>
00006 #include <vector>
00007 #include <iostream>
00008 
00009 namespace CppUnit
00010 {
00011 
00012 class Exception;
00013 class SourceLine;
00014 class Test;
00015 class TestFailure;
00016 class TestResultCollector;
00017 
00058 class CPPUNIT_API CompilerOutputter : public Outputter
00059 {
00060 public:
00063   CompilerOutputter( TestResultCollector *result,
00064                      std::ostream &stream );
00065 
00067   virtual ~CompilerOutputter();
00068 
00071   static CompilerOutputter *defaultOutputter( TestResultCollector *result,
00072                                               std::ostream &stream );
00073 
00074   void write();
00075 
00076   virtual void printSucess();
00077   virtual void printFailureReport();
00078   virtual void printFailuresList();
00079   virtual void printStatistics();
00080   virtual void printFailureDetail( TestFailure *failure );
00081   virtual void printFailureLocation( SourceLine sourceLine );
00082   virtual void printFailureType( TestFailure *failure );
00083   virtual void printFailedTestName( TestFailure *failure );
00084   virtual void printFailureMessage( TestFailure *failure );
00085   virtual void printNotEqualMessage( Exception *thrownException );
00086   virtual void printDefaultMessage( Exception *thrownException );
00087   virtual std::string wrap( std::string message );
00088 
00089 private:
00091   CompilerOutputter( const CompilerOutputter &copy );
00092 
00094   void operator =( const CompilerOutputter &copy );
00095 
00096   typedef std::vector<std::string> Lines;
00097   static Lines splitMessageIntoLines( std::string message );
00098 
00099 private:
00100   TestResultCollector *m_result;
00101   std::ostream &m_stream;
00102 };
00103 
00104 
00105 }  // namespace CppUnit
00106 
00107 
00108 
00109 #endif  // CPPUNIT_COMPILERTESTRESULTOUTPUTTER_H

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