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

cppunit::TestResult Class Reference

テスト結果を保持するクラス。
A TestResult collects the results of executing a test case. More...

#include <TestResult.h>

List of all members.

Public Methods

 TestResult (Mutex *mutex=0)
 コンストラクタ。. More...

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

void addListener (TestListener *listener)
 リスナを追加する。. More...

void startTest (Test *test)
 テストを開始する。
Informs the result that a test will be started.
More...


void endTest (Test *test)
 テストが終了した。
Informs the result that a test was completed.
More...


void addFailure (const TestFailure *failure)
 テストの失敗を追加する。
Adds a failure to the list of failures.
More...


void addError (const TestFailure *error)
 エラーを追加する。
Adds an error to the list of errors.
More...


int runCount () const
 実行されたテストの個数を返す。
Gets the number of run tests.
More...


int failureCount () const
 失敗したテストの個数を返す。
Gets the number of detected failures.
More...


int errorCount () const
 エラーになったテストの個数を返す。
Gets the number of detected errors.
More...


bool wasSuccessful () const
 一連のテストが成功したか?
Returns whether the entire test was successful or not.
More...


bool shouldStop () const
 テストを中止する必要があるか?
Returns whether testing should be stopped.
More...


void stop ()
 テストを中止する。
Stop testing.
More...


const cu_List & failures () const
 失敗したテストのリストを返す。
Returns a list of the failures.
More...


const cu_List & errors () const
 エラーのリストを返す。
Returns a list of the errors.
More...



Detailed Description

テスト結果を保持するクラス。
A TestResult collects the results of executing a test case.

It is an instance of the Collecting Parameter pattern.

The test framework distinguishes between failures and errors.
A failure is anticipated and checked for with assertions.
Errors are unanticipated problems signified by exceptions that are not generated by the framework.

保有する TestFailure のライフサイクルを管理する。
TestListener のライフサイクルはクライアント側で管理すること。

See also:
Test


Constructor & Destructor Documentation

cppunit::TestResult::TestResult Mutex   mutex = 0 [explicit]
 

コンストラクタ。.

Parameters:
mutex  0 または new された排他セマフォ。

cppunit::TestResult::~TestResult  
 

デストラクタ。.


Member Function Documentation

void cppunit::TestResult::addListener TestListener   listener
 

リスナを追加する。.

※テスト実行中は使用しないこと。

void cppunit::TestResult::startTest Test   test
 

テストを開始する。
Informs the result that a test will be started.

void cppunit::TestResult::endTest Test   test
 

テストが終了した。
Informs the result that a test was completed.

void cppunit::TestResult::addFailure const TestFailure   failure
 

テストの失敗を追加する。
Adds a failure to the list of failures.

Parameters:
failure  失敗したテストの情報。

void cppunit::TestResult::addError const TestFailure   error
 

エラーを追加する。
Adds an error to the list of errors.

Parameters:
error  エラー情報。

int cppunit::TestResult::runCount   const
 

実行されたテストの個数を返す。
Gets the number of run tests.

int cppunit::TestResult::failureCount   const
 

失敗したテストの個数を返す。
Gets the number of detected failures.

int cppunit::TestResult::errorCount   const
 

エラーになったテストの個数を返す。
Gets the number of detected errors.

bool cppunit::TestResult::wasSuccessful   const
 

一連のテストが成功したか?
Returns whether the entire test was successful or not.

bool cppunit::TestResult::shouldStop   const
 

テストを中止する必要があるか?
Returns whether testing should be stopped.

void cppunit::TestResult::stop  
 

テストを中止する。
Stop testing.

const cu_List& cppunit::TestResult::failures   const [inline]
 

失敗したテストのリストを返す。
Returns a list of the failures.

※テスト実行中は使用しないこと。

const cu_List& cppunit::TestResult::errors   const [inline]
 

エラーのリストを返す。
Returns a list of the 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