[ CCUnit project page ] |  | [ CCUnit home page ]

型定義 | 関数

# テストの実行

テストスイートを実行します。 [詳細]

## 型定義
typedef struct CCUnitTestRunner | CCUnitTestRunner
| A command line based tool to run tests.
## 関数
struct CCUnitTestResult * | ccunit_runTestCase (CCUnitTestCase *testCase)
| run test cases and collect its results.
CCUnitTestRunner * | ccunit_newTestRunner (FILE *output)
| constructor.
void | ccunit_deleteTestRunner (CCUnitTestRunner *runner)
| destructor.
int | ccunit_runTestRunner (CCUnitTestRunner *runner, CCUnitTestSuite *suite)
| Runs test suite.
CCUnitTestResult * | ccunit_runTestSuite (CCUnitTestSuite *suite, CCUnitTestResult *result)
| run test suite and collect its results.

## 説明

テストスイートを実行します。

## 型定義

typedef struct CCUnitTestRunner CCUnitTestRunner

A command line based tool to run tests.

Runs a single test and collects its results. This method can be used to start a test run from your program.

         int main (int ac, char** av)
         {
           CCUnitTestRunner* runner = ccunit_newTestRunner (NULL);
           CCUnitTestSuite* suite = CREATE_TESTSUITE ();
           return runner->run (runner, suite);
         }

参照:
  CCUnitTestSuite, CCUnitTestCase.

## 関数

void ccunit_deleteTestRunner | ( | CCUnitTestRunner * | runner | ) |

destructor.

引数:

  | runner | TestRunner object to destruct.

CCUnitTestRunner * ccunit_newTestRunner | ( | FILE * | output | ) |

constructor.

引数:

  | output | prints test result into this stream.

戻り値:
  new CCUnitTestRunner object.

struct CCUnitTestResult* ccunit_runTestCase | ( | CCUnitTestCase * | testCase | ) | `[read]`

run test cases and collect its results.

引数:

  | testCase | test case.

戻り値:
  test result.

参照先 ccunit_newTestResult(), CCUnitTest::run, と CCUnitTestCase::test.

関数の呼び出しグラフ:

int ccunit_runTestRunner | ( | CCUnitTestRunner * | runner,
|  | CCUnitTestSuite * | suite |
| ) |  |  | `[inline]`

Runs test suite.

引数:

  | runner | test runner
  | suite | test suite

戻り値:
  0 if succeeded, -1 if error occurred.

CCUnitTestResult * ccunit_runTestSuite | ( | CCUnitTestSuite * | suite,
|  | CCUnitTestResult * | result |
| ) |  |  | `[inline]`

run test suite and collect its results.

引数:

  | suite | test suite.
  | result | test result. if NULL, create a new result object and return it.

戻り値:
  test result.

参照元 doRun().

呼出しグラフ:

| hosts this site. |  | Send comments to: CCUnit Developer |