1 |
jgs |
82 |
|
2 |
|
|
#ifndef CPPUNIT_TEXTTESTRESULT_H |
3 |
|
|
#define CPPUNIT_TEXTTESTRESULT_H |
4 |
|
|
|
5 |
|
|
#include <iostream> |
6 |
|
|
|
7 |
|
|
#include "CppUnitTest/TestResult.h" |
8 |
|
|
|
9 |
|
|
#include "CppUnitTest/CppUnitTestNamespace.h" |
10 |
|
|
BEGIN_NAMESPACE_CPPUNITTEST |
11 |
|
|
|
12 |
|
|
class TextTestResult : public TestResult |
13 |
|
|
{ |
14 |
|
|
public: |
15 |
|
|
virtual void addError (Test *test, CppUnitException *e); |
16 |
|
|
virtual void addFailure (Test *test, CppUnitException *e); |
17 |
|
|
virtual void startTest (Test *test); |
18 |
|
|
virtual void print (std::ostream& stream); |
19 |
|
|
virtual void printErrors (std::ostream& stream); |
20 |
|
|
virtual void printFailures (std::ostream& stream); |
21 |
|
|
virtual void printHeader (std::ostream& stream); |
22 |
|
|
|
23 |
|
|
}; |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
/* insertion operator for easy output */ |
27 |
|
|
inline std::ostream& operator<< (std::ostream& stream, TextTestResult& result) |
28 |
|
|
{ result.print (stream); return stream; } |
29 |
|
|
|
30 |
|
|
END_NAMESPACE_CPPUNITTEST |
31 |
|
|
|
32 |
|
|
#endif |
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
|