CppUnit project page | FAQ | CppUnit home page

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

TextTestResult.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TEXTTESTRESULT_H
2 #define CPPUNIT_TEXTTESTRESULT_H
3
4 #include <cppunit/TestResult.h>
5 #include <cppunit/TestResultCollector.h>
6 #include <cppunit/portability/Stream.h>
7
8 CPPUNIT_NS_BEGIN
9
10
11 class SourceLine;
12 class Exception;
13 class Test;
14
20 class CPPUNIT_API TextTestResult : public TestResult,
21 public TestResultCollector
22 {
23 public:
24 TextTestResult();
25
26 virtual void addFailure( const TestFailure &failure );
27 virtual void startTest( Test *test );
28 virtual void print( OStream &stream );
29 };
30
32 CPPUNIT_API OStream &operator <<( OStream &stream,
33 TextTestResult &result );
34
35 CPPUNIT_NS_END
36
37 #endif // CPPUNIT_TEXTTESTRESULT_H
38
39
Exception
Exceptions thrown by failed assertions.Exception is an exception that serves descriptive strings thro...
Definition: Exception.h:19
TestResultCollector.h
TestResult::addFailure
virtual void addFailure(Test *test, Exception *e)
Adds a failure to the list of failures. The passed in exception caused the failure.
Definition: TestResult.cpp:47
TestResult
Manages TestListener.A single instance of this class is used when running the test. It is usually created by the test runner (TestRunner).
Definition: TestResult.h:51
TextTestResult
Holds printable test result (DEPRECATED).deprecated Use class TextTestProgressListener and TextOutput...
Definition: TextTestResult.h:20
TestResult.h
OStream
CPPUNIT_NS_BEGIN typedef std::ostream OStream
Definition: Stream.h:330
Test
Base class for all test objects.All test objects should be a subclass of Test. Some test objects...
Definition: Test.h:25
SourceLine
Represents a source line location.Used to capture the failure location in assertion.
Definition: SourceLine.h:30
TestFailure
Record of a failed Test execution.A TestFailure collects a failed test together with the caught excep...
Definition: TestFailure.h:24
operator<<
CPPUNIT_API OStream & operator<<(OStream &stream, TextTestResult &result)
insertion operator for easy output
Definition: TextTestResult.cpp:43
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
TestResultCollector
Collects test result.A TestResultCollector is a TestListener which collects the results of executing ...
Definition: TestResultCollector.h:36
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
TestResult::startTest
virtual void startTest(Test *test)
Informs TestListener that a test will be started.
Definition: TestResult.cpp:66
Stream.h
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| hosts this site. |  | Send comments to: CppUnit Developers