CppUnit project page | FAQ |
Holds printable test result (DEPRECATED).deprecated Use class TextTestProgressListener and TextOutputter instead. More...
#include <TextTestResult.h>
Public Member Functions | |
TextTestResult () | |
virtual void | addFailure (const TestFailure &failure) |
Called to add a failure to the list of failures. | |
virtual void | startTest (Test *test) |
Informs TestListener that a test will be started. | |
virtual void | print (OStream &stream) |
Public Member Functions inherited from TestResult | |
TestResult (SynchronizationObject *syncObject=0) | |
Construct a TestResult. | |
virtual | ~TestResult () |
Destroys a test result. | |
virtual void | addListener (TestListener *listener) |
virtual void | removeListener (TestListener *listener) |
virtual void | reset () |
Resets the stop flag. | |
virtual void | stop () |
Stop testing. | |
virtual bool | shouldStop () const |
Returns whether testing should be stopped. | |
virtual void | addError (Test *test, Exception *e) |
Adds an error to the list of errors. The passed in exception caused the error. | |
virtual void | addFailure (Test *test, Exception *e) |
Adds a failure to the list of failures. The passed in exception caused the failure. | |
virtual void | endTest (Test *test) |
Informs TestListener that a test was completed. | |
virtual void | startSuite (Test *test) |
Informs TestListener that a test suite will be started. | |
virtual void | endSuite (Test *test) |
Informs TestListener that a test suite was completed. | |
virtual void | runTest (Test *test) |
Run the specified test. | |
virtual bool | protect (const Functor &functor, Test *test, const std::string &shortDescription=std::string("")) |
Protects a call to the specified functor. | |
virtual void | pushProtector (Protector *protector) |
Adds the specified protector to the protector chain. | |
virtual void | popProtector () |
Removes the last protector from the protector chain. | |
Public Member Functions inherited from TestResultCollector | |
TestResultCollector (SynchronizationObject *syncObject=0) | |
virtual | ~TestResultCollector () |
Destructor. | |
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 |
Public Member Functions inherited from TestSuccessListener | |
TestSuccessListener (SynchronizationObject *syncObject=0) | |
virtual | ~TestSuccessListener () |
Destructor. | |
virtual bool | wasSuccessful () const |
Returns whether the entire test was successful or not. | |
Public Member Functions inherited from TestListener | |
virtual | ~TestListener () |
virtual void | endTest (Test *) |
Called just after a TestCase was run (even if a failure occured). | |
virtual void | startSuite (Test *) |
Called by a TestComposite just before running its child tests. | |
virtual void | endSuite (Test *) |
Called by a TestComposite after running its child tests. | |
virtual void | startTestRun (Test *, TestResult *) |
Called by a TestRunner before running the test. | |
virtual void | endTestRun (Test *, TestResult *) |
Called by a TestRunner after running the test. |
Additional Inherited Members | |
Public Types inherited from TestResultCollector | |
typedef CppUnitDeque < TestFailure * > | TestFailures |
typedef CppUnitDeque< Test * > | Tests |
Protected Types inherited from TestResult | |
typedef CppUnitDeque < TestListener * > | TestListeners |
Protected Member Functions inherited from TestResult | |
virtual void | startTestRun (Test *test) |
virtual void | endTestRun (Test *test) |
Protected Member Functions inherited from SynchronizedObject | |
SynchronizedObject (SynchronizationObject *syncObject=0) | |
virtual | ~SynchronizedObject () |
Destructor. | |
virtual void | setSynchronizationObject (SynchronizationObject *syncObject) |
Accept a new synchronization object for protection of this instance TestResult assumes ownership of the object. | |
Protected Member Functions inherited from TestResultCollector | |
void | freeFailures () |
Protected Attributes inherited from TestResult | |
TestListeners | m_listeners |
ProtectorChain * | m_protectorChain |
bool | m_stop |
Protected Attributes inherited from TestResultCollector | |
Tests | m_tests |
TestFailures | m_failures |
int | m_testErrors |
Holds printable test result (DEPRECATED).
deprecated Use class TextTestProgressListener and TextOutputter instead.
CPPUNIT_NS_BEGIN TextTestResult::TextTestResult | ( | ) |
|
virtual |
Called to add a failure to the list of failures.
Reimplemented from TestResult.
|
virtual |
|
virtual |
Informs TestListener that a test will be started.
Reimplemented from TestResult.
Send comments to: CppUnit Developers |