CppUnit project page | FAQ | CppUnit home page

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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# TestSuccessListener Class Reference
[Tracking test execution]

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

`#include <TestSuccessListener.h>`

Inheritance diagram for TestSuccessListener:

[legend]
Collaboration diagram for TestSuccessListener:

[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.
## Private Attributes
bool | m_success

## 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::reset | ( |  | ) | `[virtual]`

Reimplemented in TestResultCollector.

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.

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:

- TestSuccessListener.h
- TestSuccessListener.cpp

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