CppUnit project page | FAQ

Public Member Functions | Private Member Functions | Private Attributes | List of all members
RepeatedTest Class Reference

Decorator that runs a test repeatedly. More...

`#include <RepeatedTest.h>`

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

## Public Member Functions
| RepeatedTest (Test *test, int timesRepeat)
void | run (TestResult *result)
| Run the test, collecting results.
int | countTestCases () const
| Return the number of test cases invoked by run().
Public Member Functions inherited from TestDecorator
| TestDecorator (Test *test)
| ~TestDecorator ()
int | countTestCases () const
| Return the number of test cases invoked by run().
std::string | getName () const
| Returns the test name.
void | run (TestResult *result)
| Run the test, collecting results.
int | getChildTestCount () const
| Returns the number of direct child of the test.
Public Member Functions inherited from Test
virtual | ~Test ()
virtual Test * | getChildTestAt (int index) const
| Returns the child test of the specified index.
virtual bool | findTestPath (const std::string &testName, TestPath &testPath) const
| Finds the test with the specified name and its parents test.
virtual bool | findTestPath (const Test *test, TestPath &testPath) const
| Finds the specified test and its parents test.
virtual Test * | findTest (const std::string &testName) const
| Finds the test with the specified name in the hierarchy.
virtual TestPath | resolveTestPath (const std::string &testPath) const
| Resolved the specified test path with this test acting as 'root'.

## Private Member Functions
| RepeatedTest (const RepeatedTest &)
void | operator= (const RepeatedTest &)

## Private Attributes
const int | m_timesRepeat

## Additional Inherited Members
Protected Member Functions inherited from TestDecorator
Test * | doGetChildTestAt (int index) const
| Returns the child test of the specified valid index.
Protected Member Functions inherited from Test
virtual void | checkIsValidIndex (int index) const
Protected Attributes inherited from TestDecorator
Test * | m_test

## Detailed Description

Decorator that runs a test repeatedly.

Does not assume ownership of the test it decorates

## Constructor & Destructor Documentation

## ◆ RepeatedTest() [1/2]

RepeatedTest::RepeatedTest | ( | Test * | test,
|  | int | timesRepeat )
| inline

## ◆ RepeatedTest() [2/2]

RepeatedTest::RepeatedTest | ( | const RepeatedTest & |  | ) |
| private

## Member Function Documentation

## ◆ countTestCases()

CPPUNIT_NS_BEGIN int RepeatedTest::countTestCases | ( |  | ) | const
| virtual

Return the number of test cases invoked by run().

The base unit of testing is the class TestCase. This method returns the number of TestCase objects invoked by the run() method.

Implements Test.

## ◆ operator=()

void RepeatedTest::operator= | ( | const RepeatedTest & |  | ) |
| private

## ◆ run()

void RepeatedTest::run | ( | TestResult * | result | ) |
| virtual

Run the test, collecting results.

Implements Test.

## Member Data Documentation

## ◆ m_timesRepeat

const int RepeatedTest::m_timesRepeat
| private

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

- RepeatedTest.h
- RepeatedTest.cpp

| Send comments to: CppUnit Developers