CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CppUnit::TestDecorator Class Reference

Decorator for Tests. More...

#include <TestDecorator.h>

Inheritance diagram for CppUnit::TestDecorator:

CppUnit::Test CppUnit::RepeatedTest CppUnit::TestSetUp List of all members.

Public Methods

 TestDecorator (Test *test)
 ~TestDecorator ()
void run (TestResult *result)
 Run the test, collecting results. More...

int countTestCases () const
 Return the number of test cases invoked by run(). More...

std::string getName () const
 Returns the test name. More...

std::string toString () const
 Description of the test, for diagnostic output. More...


Protected Attributes

Testm_test

Private Methods

 TestDecorator (const TestDecorator &)
void operator= (const TestDecorator &)

Detailed Description

Decorator for Tests.

TestDecorator provides an alternate means to extend functionality of a test class without subclassing the test. Instead, one can subclass the decorater and use it to wrap the test class.

Does not assume ownership of the test it decorates


Constructor & Destructor Documentation

CppUnit::TestDecorator::TestDecorator Test   test [inline]
 

CppUnit::TestDecorator::~TestDecorator   [inline]
 

CppUnit::TestDecorator::TestDecorator const TestDecorator &    [private]
 


Member Function Documentation

int CppUnit::TestDecorator::countTestCases   const [inline, 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 CppUnit::Test.

Reimplemented in CppUnit::RepeatedTest.

std::string CppUnit::TestDecorator::getName   const [inline, 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 CppUnit::Test.

void CppUnit::TestDecorator::operator= const TestDecorator &    [private]
 

void CppUnit::TestDecorator::run TestResult   result [inline, virtual]
 

Run the test, collecting results.

Implements CppUnit::Test.

Reimplemented in CppUnit::RepeatedTest.

std::string CppUnit::TestDecorator::toString   const [inline, virtual]
 

Description of the test, for diagnostic output.

The test description will typically include the test name, but may have additional description. For example, a test suite named complex_add may be described as suite complex_add.

Implements CppUnit::Test.

Reimplemented in CppUnit::RepeatedTest.


Member Data Documentation

Test* CppUnit::TestDecorator::m_test [protected]
 


The documentation for this class was generated from the following file:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers