CppUnit project page | FAQ

Public Member Functions | Private Member Functions | Private Attributes | List of all members
BriefTestProgressListener Class Reference
Tracking test execution

TestListener that prints the name of each test before running it. More...

`#include <BriefTestProgressListener.h>`

Inheritance diagram for BriefTestProgressListener:
[legend]
Collaboration diagram for BriefTestProgressListener:
[legend]

## Public Member Functions
| BriefTestProgressListener ()
virtual | ~BriefTestProgressListener ()
| 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.
void | endTest (Test *test)
| Called just after a TestCase was run (even if a failure occured).
Public Member Functions inherited from TestListener
virtual | ~TestListener ()
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.

## Private Member Functions
| BriefTestProgressListener (const BriefTestProgressListener &copy)
| Prevents the use of the copy constructor.
void | operator= (const BriefTestProgressListener &copy)
| Prevents the use of the copy operator.

## Private Attributes
bool | m_lastTestFailed

## Detailed Description

TestListener that prints the name of each test before running it.

## Constructor & Destructor Documentation

## ◆ BriefTestProgressListener() [1/2]

CPPUNIT_NS_BEGIN BriefTestProgressListener::BriefTestProgressListener | ( |  | ) |

Constructs a BriefTestProgressListener object.

## ◆ ~BriefTestProgressListener()

BriefTestProgressListener::~BriefTestProgressListener | ( |  | ) |
| virtual

Destructor.

## ◆ BriefTestProgressListener() [2/2]

BriefTestProgressListener::BriefTestProgressListener | ( | const BriefTestProgressListener & | copy | ) |
| private

Prevents the use of the copy constructor.

## Member Function Documentation

## ◆ addFailure()

void BriefTestProgressListener::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.

## ◆ endTest()

void BriefTestProgressListener::endTest | ( | Test * |  | ) |
| virtual

Called just after a TestCase was run (even if a failure occured).

Reimplemented from TestListener.

## ◆ operator=()

void BriefTestProgressListener::operator= | ( | const BriefTestProgressListener & | copy | ) |
| private

Prevents the use of the copy operator.

## ◆ startTest()

void BriefTestProgressListener::startTest | ( | Test * |  | ) |
| virtual

Called when just before a TestCase is run.

Reimplemented from TestListener.

## Member Data Documentation

## ◆ m_lastTestFailed

bool BriefTestProgressListener::m_lastTestFailed
| private

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

- BriefTestProgressListener.h
- BriefTestProgressListener.cpp

| Send comments to: CppUnit Developers