CppUnit project page FAQ

Public Member Functions | Private Attributes
TestSuccessListener Class Reference

TestListener that checks if any test case failed. More...

#include <TestSuccessListener.h>

Inheritance diagram for TestSuccessListener:
Inheritance graph
[legend]
Collaboration diagram for TestSuccessListener:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestSuccessListener (SynchronizationObject *syncObject=0)
virtual ~TestSuccessListener ()
 Destructor.
virtual void reset ()
void addFailure (const TestFailure &failure)
 Called when a failure occurs while running a test.
virtual bool wasSuccessful () const
 Returns whether the entire test was successful or not.
- Public Member Functions inherited from TestListener
virtual ~TestListener ()
virtual void startTest (Test *)
 Called when just before a TestCase is run.
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.
- Public Member Functions inherited from SynchronizedObject
 SynchronizedObject (SynchronizationObject *syncObject=0)
virtual ~SynchronizedObject ()
 Destructor.

Private Attributes

bool m_success

Additional Inherited Members

- 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.
- Protected Attributes inherited from SynchronizedObject
SynchronizationObjectm_syncObject

Detailed Description

TestListener that checks if any test case failed.


Constructor & Destructor Documentation

CPPUNIT_NS_BEGIN TestSuccessListener::TestSuccessListener ( SynchronizationObject syncObject = 0)

Constructs a TestSuccessListener object.

TestSuccessListener::~TestSuccessListener ( )
virtual

Destructor.


Member Function Documentation

void TestSuccessListener::addFailure ( const TestFailure )
virtual

Called when a failure occurs while running a test.

See also:
TestFailure.
Warning:
failure is a temporary object that is destroyed after the method call. Use TestFailure::clone() to create a duplicate.

Reimplemented from TestListener.

Reimplemented in TestResultCollector, and TextTestResult.

void TestSuccessListener::reset ( )
virtual

Reimplemented in TestResultCollector.

bool TestSuccessListener::wasSuccessful ( ) const
virtual

Returns whether the entire test was successful or not.


Member Data Documentation

bool TestSuccessListener::m_success
private

The documentation for this class was generated from the following files:

Send comments to:
CppUnit Developers