CppUnit project page FAQ

TestPath.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TESTPATH_H
2 #define CPPUNIT_TESTPATH_H
3 
4 #include <cppunit/Portability.h>
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 
12 #include <string>
13 
15 
16 
17 class Test;
18 
19 #if CPPUNIT_NEED_DLL_DECL
20 // template class CPPUNIT_API std::deque<Test *>;
21 #endif
22 
23 
35 {
36 public:
41  TestPath();
42 
47  TestPath( Test *root );
48 
56  TestPath( const TestPath &otherPath,
57  int indexFirst,
58  int count = -1 );
59 
75  TestPath( Test *searchRoot,
76  const std::string &pathAsString );
77 
81  TestPath( const TestPath &other );
82 
83  virtual ~TestPath();
84 
88  virtual bool isValid() const;
89 
93  virtual void add( Test *test );
94 
98  virtual void add( const TestPath &path );
99 
105  virtual void insert( Test *test, int index );
106 
113  virtual void insert( const TestPath &path, int index );
114 
119  virtual void removeTests();
120 
125  virtual void removeTest( int index );
126 
131  virtual void up();
132 
136  virtual int getTestCount() const;
137 
143  virtual Test *getTestAt( int index ) const;
144 
149  virtual Test *getChildTest() const;
150 
161  virtual std::string toString() const;
162 
167  TestPath &operator =( const TestPath &other );
168 
169 protected:
174  void checkIndexValid( int index ) const;
175 
177  typedef CppUnitDeque<std::string> PathTestNames;
178 
185  bool splitPathString( const std::string &pathAsString,
186  PathTestNames &testNames );
187 
197  Test *findActualRoot( Test *searchRoot,
198  const std::string &pathAsString,
199  PathTestNames &testNames );
200 
201 protected:
202  typedef CppUnitDeque<Test *> Tests;
204 
205 };
206 
207 
209 
210 #endif // CPPUNIT_TESTPATH_H
211 

Send comments to:
CppUnit Developers