#include <TestCaller.h>
Inheritance diagram for cppunit::TestCaller::

Public Types | |
| typedef void(Fixture::* | TestMethod )() |
Public Methods | |
| TestCaller (const char *name, TestMethod method) | |
| コンストラクタ。 . 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... | |
| const Fixture * | fixture () const |
| Fixture を返す。. More... | |
A test caller provides access to a test case method on a test case class.
Test callers are useful when you want to run an individual test or add it to a suite.
Test Callers invoke only one Test (i.e. test method) on one Fixture of a TestCase.
Here is an example:
class MathTest : public TestCase {
...
public:
virtual void setUp();
virtual void tearDown();
void testAdd();
void testSubtract();
static Test* suite();
};
Test* MathTest::suite() {
TestSuite* suite = new TestSuite("MathTest");
suite->addTest(new TEST_CALLER(MathTest, testAdd));
return suite;
}
You can use a TestCaller to bind any test method on a TestCase class,
as long as it accepts void and returns void.
|
|||||
|
|
|
||||||||||||||||
|
コンストラクタ。
|
|
||||||||||
|
テストを実行し、結果を集める。
Reimplemented from cppunit::Test. |
|
|||||||||
|
テストケースの個数を返す。
The base unit of testing is the class TestCase. Reimplemented from cppunit::Test. |
|
|||||||||
|
テストの名前を返す。 Each test has a name. This name may be used to find the test in a suite of tests. Reimplemented from cppunit::Test. |
|
|||||||||
|
文字列に変換する。
The test description will typically include the test name, but may have additional description. Reimplemented from cppunit::Test. |
|
|||||||||
|
Fixture を返す。.
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001