Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

cppunit::TestSuite Class Reference

複数のテストの組。
A Composite of Tests. More...

#include <TestSuite.h>

Inheritance diagram for cppunit::TestSuite::

cppunit::Test List of all members.

Public Methods

 TestSuite (const char *name="")
 コンストラクタ。. More...

virtual ~TestSuite ()
 保有する Test を全て削除する。
Deletes all tests in the suite.
More...


virtual void run (TestResult *result)
 テストを実行し、結果を集める。
Run the test, collecting results.
More...


virtual int countTestCases () const
 テストケースの個数を返す。
Return the number of test cases invoked by run().
More...


virtual const char * getName () const
 テストの名前を返す。
Returns the test name.
More...


virtual cu_String toString () const
 文字列に変換する。
Description of the test, for diagnostic output.
More...


void addTest (Test *test)
 テストを追加する。
Adds a test to the suite.
More...



Detailed Description

複数のテストの組。
A Composite of Tests.

It runs a collection of test cases.
Here is an example:

     Test* suite = new TestSuite("MathTest");
     suite->addTest(new TEST_CALLER(MathTest, testAdd));
     suite->addTest(new TEST_CALLER(MathTest, testDivideByZero));
 

Note that TestSuites assume lifetime control for any tests added to them.

See also:
Test , TestCaller


Constructor & Destructor Documentation

cppunit::TestSuite::TestSuite const char *    name = "" [explicit]
 

コンストラクタ。.

Parameters:
name  テストの名前。

virtual cppunit::TestSuite::~TestSuite   [virtual]
 

保有する Test を全て削除する。
Deletes all tests in the suite.


Member Function Documentation

virtual void cppunit::TestSuite::run TestResult   result [virtual]
 

テストを実行し、結果を集める。
Run the test, collecting results.

Parameters:
result  テスト結果。

Reimplemented from cppunit::Test.

virtual int cppunit::TestSuite::countTestCases   const [virtual]
 

テストケースの個数を返す。
Return the number of test cases invoked by run().

The base unit of testing is the class TestCase.
This method returns the number of TestCase objects invoked by the run() method.

Reimplemented from cppunit::Test.

virtual const char* cppunit::TestSuite::getName   const [virtual]
 

テストの名前を返す。
Returns the test name.

Each test has a name. This name may be used to find the test in a suite of tests.

Reimplemented from cppunit::Test.

virtual cu_String cppunit::TestSuite::toString   const [virtual]
 

文字列に変換する。
Description of the test, for diagnostic output.

The test description will typically include the test name, but may have additional description.
For example, a test suite named ComplexTest may be described as suite ComplexTest.

Reimplemented from cppunit::Test.

void cppunit::TestSuite::addTest Test   test
 

テストを追加する。
Adds a test to the suite.


The documentation for this class was generated from the following file:
Generated on Sun Mar 31 23:42:08 2002 for CppUnit-x by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001