CppUnit project page | FAQ | CppUnit home page

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

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

# TestComposite Class Reference

A Composite of Tests. More...

`#include <TestComposite.h>`

Inheritance diagram for TestComposite:

[legend]
Collaboration diagram for TestComposite:

[legend]
List of all members.

## Public Member Functions
| TestComposite (const std::string &name="")
| ~TestComposite ()
void | run (TestResult *result)
| Run the test, collecting results.
int | countTestCases () const
| Return the number of test cases invoked by run().
std::string | getName () const
| Returns the test name.
## Private Member Functions
| TestComposite (const TestComposite &other)
TestComposite & | operator= (const TestComposite &other)
virtual void | doStartSuite (TestResult *controller)
virtual void | doRunChildTests (TestResult *controller)
virtual void | doEndSuite (TestResult *controller)
## Private Attributes
const std::string | m_name

## Detailed Description

A Composite of Tests.

Base class for all test composites. Subclass this class if you need to implement a custom TestSuite.

See also:
  Test, TestSuite.

## Constructor & Destructor Documentation

CPPUNIT_NS_BEGIN TestComposite::TestComposite | ( | const std::string & | name = `""` | ) |

TestComposite::~TestComposite | ( |  | ) |

TestComposite::TestComposite | ( | const TestComposite & | other | ) | `[private]`

## Member Function Documentation

void TestComposite::run | ( | TestResult * | result | ) | `[virtual]`

Run the test, collecting results.

Implements Test.

Reimplemented in TestRunner::WrappingSuite.

int TestComposite::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.

std::string TestComposite::getName | ( |  | ) | const`[virtual]`

Returns the test name.

Each test has a name. This name may be used to find the test in a suite or registry of tests.

Implements Test.

Reimplemented in TestRunner::WrappingSuite.

TestComposite& TestComposite::operator= | ( | const TestComposite & | other | ) | `[private]`

void TestComposite::doStartSuite | ( | TestResult * | controller | ) | `[private, virtual]`

void TestComposite::doRunChildTests | ( | TestResult * | controller | ) | `[private, virtual]`

void TestComposite::doEndSuite | ( | TestResult * | controller | ) | `[private, virtual]`

## Member Data Documentation

const std::string TestComposite::m_name`[private]`

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

- TestComposite.h
- TestComposite.cpp

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