00001 #ifndef CPPUNIT_TEXTTESTRESULT_H
00002 #define CPPUNIT_TEXTTESTRESULT_H
00003
00004 #include <cppunit/TestResult.h>
00005 #include <cppunit/TestResultCollector.h>
00006 #include <iostream>
00007
00008 namespace CppUnit {
00009
00010 class SourceLine;
00011 class Exception;
00012 class Test;
00013
00019 class CPPUNIT_API TextTestResult : public TestResult,
00020 public TestResultCollector
00021 {
00022 public:
00023 TextTestResult();
00024
00025 virtual void addFailure( const TestFailure &failure );
00026 virtual void startTest( Test *test );
00027 virtual void print( std::ostream &stream );
00028 virtual void printFailures( std::ostream &stream );
00029 virtual void printHeader( std::ostream &stream );
00030
00031 virtual void printFailure( TestFailure *failure,
00032 int failureNumber,
00033 std::ostream &stream );
00034 virtual void printFailureListMark( int failureNumber,
00035 std::ostream &stream );
00036 virtual void printFailureTestName( TestFailure *failure,
00037 std::ostream &stream );
00038 virtual void printFailureType( TestFailure *failure,
00039 std::ostream &stream );
00040 virtual void printFailureLocation( SourceLine sourceLine,
00041 std::ostream &stream );
00042 virtual void printFailureDetail( Exception *thrownException,
00043 std::ostream &stream );
00044 virtual void printFailureWarning( std::ostream &stream );
00045 virtual void printStatistics( std::ostream &stream );
00046 };
00047
00049 std::ostream &operator <<( std::ostream &stream,
00050 TextTestResult &result );
00051
00052 }
00053
00054 #endif // CPPUNIT_TEXTTESTRESULT_H
00055
00056