CppUnit project page FAQ

TestPath.h
Go to the documentation of this file.
1#ifndef CPPUNIT_TESTPATH_H
2#define CPPUNIT_TESTPATH_H
3
5
6#if CPPUNIT_NEED_DLL_DECL
7#pragma warning( push )
8#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
9#endif
10
11#include <deque>
12#include <string>
13
15
16
17class Test;
18
30{
31public:
36 TestPath();
37
42 TestPath( Test *root );
43
51 TestPath( const TestPath &otherPath,
52 int indexFirst,
53 int count = -1 );
54
70 TestPath( Test *searchRoot,
71 const std::string &pathAsString );
72
76 TestPath( const TestPath &other );
77
78 virtual ~TestPath();
79
83 virtual bool isValid() const;
84
88 virtual void add( Test *test );
89
93 virtual void add( const TestPath &path );
94
100 virtual void insert( Test *test, int index );
101
108 virtual void insert( const TestPath &path, int index );
109
114 virtual void removeTests();
115
120 virtual void removeTest( int index );
121
126 virtual void up();
127
131 virtual int getTestCount() const;
132
138 virtual Test *getTestAt( int index ) const;
139
144 virtual Test *getChildTest() const;
145
156 virtual std::string toString() const;
157
162 TestPath &operator =( const TestPath &other );
163
164protected:
169 void checkIndexValid( int index ) const;
170
172 typedef std::deque<std::string> PathTestNames;
173
180 bool splitPathString( const std::string &pathAsString,
181 PathTestNames &testNames );
182
192 Test *findActualRoot( Test *searchRoot,
193 const std::string &pathAsString,
194 PathTestNames &testNames );
195
196protected:
197 typedef std::deque<Test *> Tests;
199
200};
201
202
204
205#endif // CPPUNIT_TESTPATH_H
206
#define CPPUNIT_API
Definition: CppUnitApi.h:27
#define CPPUNIT_NS_END
Definition: Portability.h:106
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:105
Base class for all test objects.
Definition: Test.h:26
A List of Test representing a path to access a Test.
Definition: TestPath.h:30
std::deque< std::string > PathTestNames
A list of test names.
Definition: TestPath.h:172
Tests m_tests
Definition: TestPath.h:198
std::deque< Test * > Tests
Definition: TestPath.h:197

Send comments to:
CppUnit Developers