CppUnit - The Unit Testing Library

CppUnit project page | FAQ

TestDecorator.h
Go to the documentation of this file.
1#ifndef CPPUNIT_EXTENSIONS_TESTDECORATOR_H
2#define CPPUNIT_EXTENSIONS_TESTDECORATOR_H
3
4#include <cppunit/Portability.h>
5#include <cppunit/Test.h>
6
7 CPPUNIT_NS_BEGIN
8
9
10class TestResult;
11
12
21 class CPPUNIT_API TestDecorator : public Test
22{
23public:
24 TestDecorator( Test *test );
25 ~TestDecorator();
26
27 int countTestCases() const;
28
29 std::string getName() const;
30
31 void run( TestResult *result );
32
33 int getChildTestCount() const;
34
35protected:
36 Test *doGetChildTestAt( int index ) const;
37
38 Test *m_test;
39
40private:
41 TestDecorator( const TestDecorator &);
42 void operator =( const TestDecorator & );
43};
44
45
46 CPPUNIT_NS_END
47
48#endif
49
CPPUNIT_API
#define CPPUNIT_API
Definition CppUnitApi.h:27
Portability.h
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition Portability.h:106
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
Test.h
TestDecorator::TestDecorator
TestDecorator(const TestDecorator &)
TestDecorator::m_test
Test * m_test
Definition TestDecorator.h:38
TestDecorator::TestDecorator
TestDecorator(Test *test)
Definition TestDecorator.cpp:6
Test
Base class for all test objects.
Definition Test.h:26
Test::getName
virtual std::string getName() const =0
Returns the test name.
Test::getChildTestCount
virtual int getChildTestCount() const =0
Returns the number of direct child of the test.
Test::run
virtual void run(TestResult *result)=0
Run the test, collecting results.
Test::countTestCases
virtual int countTestCases() const =0
Return the number of test cases invoked by run().
Test::doGetChildTestAt
virtual Test * doGetChildTestAt(int index) const =0
Returns the child test of the specified valid index.
TestResult
Manages TestListener.
Definition TestResult.h:48

| Send comments to: CppUnit Developers