arabica/tests/CppUnit/textui/TextTestResult.h

40 lines
1.1 KiB
C
Raw Normal View History

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:
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);
protected:
const std::string& name() const { return name_; }
2006-10-12 00:51:04 +02:00
private:
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