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

cppunit::TestRunner Class Reference

テキスト版テストランナ
A text mode test runner. More...

#include <TestRunner.h>

List of all members.

Public Methods

 TestRunner ()
 コンストラクタ。. More...

 ~TestRunner ()
 デストラクタ。. More...

void addTest (Test *test)
 テストを追加する。. More...

void addTest (const char *name, Test *test)
 テストを追加する。. More...

int run (int argc, char *argv[])
 テストを実行する。. More...


Protected Methods

int parseArgs (int argc, char *argv[])
 コマンドライン引数を解析する。. More...

int runTests ()
 テストを実行する。. More...

void wait ()
 キーボードからの入力を待つ。. More...

void printUsage (const char *command) const
 使用法を表示する。. More...

void printResult (const TestResult &result) const
 テスト結果を表示する。. More...

void printHeader (const TestResult &result) const
 テスト結果のヘッダを表示する。. More...

void printFailures (const cu_List &failures) const
 失敗したテストのリストを表示する。. More...

void printErrors (const cu_List &errors) const
 エラーのリストを表示する。. More...


Detailed Description

テキスト版テストランナ
A text mode test runner.

The test runner manage the life cycle of the added tests.

TestRunner prints out a trace as the tests are executed followed by a summary at the end.

Here is an example:

 class ATestCase : public TestCase { ... };

 int main(int argc, char* argv[]) {
     TestRunner runner;
     runner.addTest("ATestCase", new ATestCase("ATestCase"));
     return runner.run(argc, argv);
 }
 


Constructor & Destructor Documentation

cppunit::TestRunner::TestRunner  
 

コンストラクタ。.

cppunit::TestRunner::~TestRunner   [inline]
 

デストラクタ。.


Member Function Documentation

void cppunit::TestRunner::addTest Test   test
 

テストを追加する。.

Parameters:
test  追加するテスト。

void cppunit::TestRunner::addTest const char *    name,
Test   test
 

テストを追加する。.

Parameters:
name  テスト名。
test  追加するテスト。

int cppunit::TestRunner::run int    argc,
char *    argv[]
 

テストを実行する。.

Parameters:
argc  コマンドライン引数の個数。
argv  コマンドライン引数の配列。
Returns:
実行結果。0: SUCCESS, 1: FAILURE, etc.

int cppunit::TestRunner::parseArgs int    argc,
char *    argv[]
[protected]
 

コマンドライン引数を解析する。.

Parameters:
argc  コマンドライン引数の個数。
argv  コマンドライン引数の配列。

int cppunit::TestRunner::runTests   [protected]
 

テストを実行する。.

void cppunit::TestRunner::wait   [protected]
 

キーボードからの入力を待つ。.

void cppunit::TestRunner::printUsage const char *    command const [protected]
 

使用法を表示する。.

Parameters:
command  コマンド名。

void cppunit::TestRunner::printResult const TestResult   result const [protected]
 

テスト結果を表示する。.

Parameters:
result  テスト結果。

void cppunit::TestRunner::printHeader const TestResult   result const [protected]
 

テスト結果のヘッダを表示する。.

Parameters:
result  テスト結果。

void cppunit::TestRunner::printFailures const cu_List &    failures const [protected]
 

失敗したテストのリストを表示する。.

Parameters:
failures  失敗したテストのリスト。

void cppunit::TestRunner::printErrors const cu_List &    errors const [protected]
 

エラーのリストを表示する。.

Parameters:
errors  エラーのリスト。


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