CppUnit project page | FAQ | CppUnit home page

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

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

# TestLeaf Class Reference

A single test object. More...

`#include <TestLeaf.h>`

Inheritance diagram for TestLeaf:

[legend]
Collaboration diagram for TestLeaf:

[legend]
List of all members.

## Public Member Functions
int | countTestCases () const
int | getChildTestCount () const
Test * | doGetChildTestAt (int index) const

## Detailed Description

A single test object.

Base class for single test case: a test that doesn't have any children.

## Member Function Documentation

CPPUNIT_NS_BEGIN int TestLeaf::countTestCases | ( |  | ) | const`[virtual]`

Returns 1 as the default number of test cases invoked by run().

You may override this method when many test cases are invoked (RepeatedTest for example).

Returns:
  1.

See also:
  Test::countTestCases().

Implements Test.

int TestLeaf::getChildTestCount | ( |  | ) | const`[virtual]`

Returns the number of child of this test case: 0.

You should never override this method: a TestLeaf as no children by definition.

Returns:
  0.

Implements Test.

Test * TestLeaf::doGetChildTestAt | ( | int | index | ) | const`[virtual]`

Always throws std::out_of_range.

See also:
  Test::doGetChildTestAt().

Implements Test.

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

- TestLeaf.h
- TestLeaf.cpp

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