| CppUnit project page | FAQ | 
Collects test result. More...
#include <TestResultCollector.h>


| Public Types | |
| typedef std::deque< TestFailure * > | TestFailures | 
| typedef std::deque< Test * > | Tests | 
| Public Member Functions | |
| TestResultCollector (SynchronizationObject *syncObject=0) | |
| virtual | ~TestResultCollector () | 
| Destructor.  More... | |
| void | startTest (Test *test) | 
| Called when just before a TestCase is run.  More... | |
| void | addFailure (const TestFailure &failure) | 
| Called when a failure occurs while running a test.  More... | |
| virtual void | reset () | 
| virtual int | runTests () const | 
| Gets the number of run tests.  More... | |
| virtual int | testErrors () const | 
| Gets the number of detected errors (uncaught exception).  More... | |
| virtual int | testFailures () const | 
| Gets the number of detected failures (failed assertion).  More... | |
| virtual int | testFailuresTotal () const | 
| Gets the total number of detected failures.  More... | |
| virtual const TestFailures & | failures () const | 
| Returns a the list failures (random access collection).  More... | |
| virtual const Tests & | tests () const | 
|  Public Member Functions inherited from TestSuccessListener | |
| TestSuccessListener (SynchronizationObject *syncObject=0) | |
| virtual | ~TestSuccessListener () | 
| Destructor.  More... | |
| void | addFailure (const TestFailure &failure) | 
| Called when a failure occurs while running a test.  More... | |
| virtual bool | wasSuccessful () const | 
| Returns whether the entire test was successful or not.  More... | |
|  Public Member Functions inherited from TestListener | |
| virtual | ~TestListener () | 
| virtual void | endTest (Test *) | 
| Called just after a TestCase was run (even if a failure occured).  More... | |
| virtual void | startSuite (Test *) | 
| Called by a TestComposite just before running its child tests.  More... | |
| virtual void | endSuite (Test *) | 
| Called by a TestComposite after running its child tests.  More... | |
| virtual void | startTestRun (Test *, TestResult *) | 
| Called by a TestRunner before running the test.  More... | |
| virtual void | endTestRun (Test *, TestResult *) | 
| Called by a TestRunner after running the test.  More... | |
|  Public Member Functions inherited from SynchronizedObject | |
| SynchronizedObject (SynchronizationObject *syncObject=0) | |
| virtual | ~SynchronizedObject () | 
| Destructor.  More... | |
| Protected Member Functions | |
| void | freeFailures () | 
|  Protected Member Functions inherited from SynchronizedObject | |
| virtual void | setSynchronizationObject (SynchronizationObject *syncObject) | 
| Accept a new synchronization object for protection of this instance TestResult assumes ownership of the object.  More... | |
| Protected Attributes | |
| Tests | m_tests | 
| TestFailures | m_failures | 
| int | m_testErrors | 
|  Protected Attributes inherited from SynchronizedObject | |
| SynchronizationObject * | m_syncObject | 
| Private Member Functions | |
| TestResultCollector (const TestResultCollector ©) | |
| Prevents the use of the copy constructor.  More... | |
| void | operator= (const TestResultCollector ©) | 
| Prevents the use of the copy operator.  More... | |
Collects test result.
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.
| typedef std::deque<TestFailure *> TestResultCollector::TestFailures | 
| typedef std::deque<Test *> TestResultCollector::Tests | 
| CPPUNIT_NS_BEGIN TestResultCollector::TestResultCollector | ( | SynchronizationObject * | syncObject = 0 | ) | 
Constructs a TestResultCollector object.
| 
 | virtual | 
Destructor.
| 
 | private | 
Prevents the use of the copy constructor.
| 
 | virtual | 
Called when a failure occurs while running a test.
Reimplemented from TestListener.
Reimplemented in TextTestResult.
| 
 | virtual | 
Returns a the list failures (random access collection).
| 
 | protected | 
| 
 | private | 
Prevents the use of the copy operator.
| 
 | virtual | 
Reimplemented from TestSuccessListener.
| 
 | virtual | 
Gets the number of run tests.
| 
 | virtual | 
Called when just before a TestCase is run.
Reimplemented from TestListener.
Reimplemented in TextTestResult.
| 
 | virtual | 
Gets the number of detected errors (uncaught exception).
| 
 | virtual | 
Gets the number of detected failures (failed assertion).
| 
 | virtual | 
Gets the total number of detected failures.
| 
 | virtual | 
| 
 | protected | 
| 
 | protected | 
| 
 | protected | 
| Send comments to: CppUnit Developers |