2005-08-04 23:23:48 +02:00
|
|
|
|
|
|
|
#ifndef CPPUNIT_TEXTTESTRESULT_H
|
|
|
|
#define CPPUNIT_TEXTTESTRESULT_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include "../framework/TestResult.h"
|
|
|
|
|
|
|
|
|
|
|
|
class TextTestResult : public TestResult
|
|
|
|
{
|
|
|
|
public:
|
2006-10-12 00:51:04 +02:00
|
|
|
TextTestResult(bool verbose) : verbose_(verbose) { }
|
2005-08-04 23:23:48 +02:00
|
|
|
virtual void addError (Test *test, CppUnitException *e);
|
|
|
|
virtual void addFailure (Test *test, CppUnitException *e);
|
|
|
|
virtual void startTest (Test *test);
|
|
|
|
virtual void print (std::ostream& stream);
|
|
|
|
virtual void printErrors (std::ostream& stream);
|
|
|
|
virtual void printFailures (std::ostream& stream);
|
|
|
|
virtual void printHeader (std::ostream& stream);
|
|
|
|
|
2006-10-12 00:51:04 +02:00
|
|
|
private:
|
|
|
|
bool verbose_;
|
2005-08-04 23:23:48 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* insertion operator for easy output */
|
|
|
|
inline std::ostream& operator<< (std::ostream& stream, TextTestResult& result)
|
|
|
|
{ result.print (stream); return stream; }
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|