1 #ifndef CPPUNIT_TESTLEAF_H
2 #define CPPUNIT_TESTLEAF_H
4 #include <cppunit/Test.h>
10 /*! \brief A single test object.
12 * Base class for single test case: a test that doesn't have any children.
15 class CPPUNIT_API TestLeaf: public Test
18 /*! Returns 1 as the default number of test cases invoked by run().
20 * You may override this method when many test cases are invoked (RepeatedTest
24 * \see Test::countTestCases().
26 int countTestCases() const;
28 /*! Returns the number of child of this test case: 0.
30 * You should never override this method: a TestLeaf as no children by definition.
34 int getChildTestCount() const;
36 /*! Always throws std::out_of_range.
37 * \see Test::doGetChildTestAt().
39 Test *doGetChildTestAt( int index ) const;
44 #endif // CPPUNIT_TESTLEAF_H