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:
|
2007-08-29 04:03:12 +02:00
|
|
|
TextTestResult(const std::string& name, bool verbose) : name_(name), verbose_(verbose) { }
|
2005-08-04 23:23:48 +02:00
|
|
|
virtual void addError (Test *test, CppUnitException *e);
|
|
|
|
virtual void addFailure (Test *test, CppUnitException *e);
|
2007-07-19 18:57:04 +02:00
|
|
|
virtual void addSkip (Test *test, CppUnitException *e);
|
2005-08-04 23:23:48 +02:00
|
|
|
virtual void startTest (Test *test);
|
|
|
|
virtual void print (std::ostream& stream);
|
|
|
|
virtual void printErrors (std::ostream& stream);
|
|
|
|
virtual void printFailures (std::ostream& stream);
|
2007-07-19 18:57:04 +02:00
|
|
|
virtual void printSkips (std::ostream& stream);
|
2005-08-04 23:23:48 +02:00
|
|
|
virtual void printHeader (std::ostream& stream);
|
|
|
|
|
2008-08-10 00:19:21 +02:00
|
|
|
protected:
|
|
|
|
const std::string& name() const { return name_; }
|
|
|
|
|
2006-10-12 00:51:04 +02:00
|
|
|
private:
|
2007-08-29 04:03:12 +02:00
|
|
|
std::string name_;
|
2006-10-12 00:51:04 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
|