source: trunk/contrib/cppunit-1.12.2/include/cppunit/TestLeaf.h @ 876

Last change on this file since 876 was 876, checked in by sam, 9 years ago

contrib: add a precompiled Win32 version of CppUnit and update build system
accordingly.

File size: 921 bytes
Line 
1#ifndef CPPUNIT_TESTLEAF_H
2#define CPPUNIT_TESTLEAF_H
3
4#include <cppunit/Test.h>
5
6
7CPPUNIT_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 */
15class CPPUNIT_API TestLeaf: public Test
16{
17public:
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
42CPPUNIT_NS_END
43
44#endif // CPPUNIT_TESTLEAF_H
Note: See TracBrowser for help on using the repository browser.