CppUnit project page | FAQ | CppUnit home page |
#include <TestResultCollector.h>
Inheritance diagram for TestResultCollector:
Public Types | |
typedef CppUnitDeque< TestFailure * > | TestFailures |
typedef CppUnitDeque< Test * > | Tests |
Public Member Functions | |
TestResultCollector (SynchronizationObject *syncObject=0) | |
virtual | ~TestResultCollector () |
Destructor. | |
void | startTest (Test *test) |
Called when just before a TestCase is run. | |
void | addFailure (const TestFailure &failure) |
Called when a failure occurs while running a test. | |
virtual void | reset () |
virtual int | runTests () const |
Gets the number of run tests. | |
virtual int | testErrors () const |
Gets the number of detected errors (uncaught exception). | |
virtual int | testFailures () const |
Gets the number of detected failures (failed assertion). | |
virtual int | testFailuresTotal () const |
Gets the total number of detected failures. | |
virtual const TestFailures & | failures () const |
Returns a the list failures (random access collection). | |
virtual const Tests & | tests () const |
Protected Attributes | |
Tests | m_tests |
TestFailures | m_failures |
int | m_testErrors |
Private Member Functions | |
TestResultCollector (const TestResultCollector ©) | |
Prevents the use of the copy constructor. | |
void | operator= (const TestResultCollector ©) |
Prevents the use of the copy operator. |
A TestResultCollector is a TestListener which collects the results of executing a test case. It is an instance of the Collecting Parameter pattern.
The test framework distinguishes between failures and errors. A failure is anticipated and checked for with assertions. Errors are unanticipated problems signified by exceptions that are not generated by the framework.
|
|
|
|
|
Constructs a TestResultCollector object. |
|
Destructor.
|
|
Prevents the use of the copy constructor.
|
|
Called when a failure occurs while running a test.
Reimplemented from TestSuccessListener. Reimplemented in TextTestResult. |
|
Returns a the list failures (random access collection).
|
|
Prevents the use of the copy operator.
|
|
Reimplemented from TestSuccessListener. |
|
Gets the number of run tests.
|
|
Called when just before a TestCase is run.
Reimplemented from TestListener. Reimplemented in TextTestResult. |
|
Gets the number of detected errors (uncaught exception).
|
|
Gets the number of detected failures (failed assertion).
|
|
Gets the total number of detected failures.
|
|
|
|
|
|
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |