Imported Upstream version 2.81
[platform/upstream/libbullet.git] / UnitTests / cppunit / include / cppunit / TestLeaf.h
1 #ifndef CPPUNIT_TESTLEAF_H
2 #define CPPUNIT_TESTLEAF_H
3
4 #include <cppunit/Test.h>
5
6
7 CPPUNIT_NS_BEGIN
8
9
10 /*! \brief A single test object.
11  *
12  * Base class for single test case: a test that doesn't have any children.
13  *
14  */
15 class CPPUNIT_API TestLeaf: public Test
16 {
17 public:
18   /*! Returns 1 as the default number of test cases invoked by run().
19    * 
20    * You may override this method when many test cases are invoked (RepeatedTest
21    * for example).
22    * 
23    * \return 1.
24    * \see Test::countTestCases().
25    */
26   int countTestCases() const;
27
28   /*! Returns the number of child of this test case: 0.
29    *
30    * You should never override this method: a TestLeaf as no children by definition.
31    *
32    * \return 0.
33    */
34   int getChildTestCount() const;
35
36   /*! Always throws std::out_of_range.
37    * \see Test::doGetChildTestAt().
38    */
39   Test *doGetChildTestAt( int index ) const;
40 };
41
42 CPPUNIT_NS_END
43
44 #endif // CPPUNIT_TESTLEAF_H