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

Typedefs | Functions

# Executing test

## Typedefs
typedef struct CCUnitTestRunner | CCUnitTestRunner
| A command line based tool to run tests.
## Functions
struct CCUnitTestResult * | ccunit_runTestFixture (CCUnitTestFixture *f)
| 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 Documentation

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);
         }

See also:
  CCUnitTestSuite, CCUnitTestCase.

## Function Documentation

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

destructor.

Parameters:

  | runner | TestRunner object to destruct.

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

constructor.

Parameters:

  | output | prints test result into this stream.

Returns:
  new CCUnitTestRunner object.

struct CCUnitTestResult* ccunit_runTestFixture | ( | CCUnitTestFixture * | f | ) | `[read]`

run test cases and collect its results.

Parameters:

  | f | test fixture.

Returns:
  test result.

References ccunit_newTestResult(), CCUnitTest::run, and CCUnitTestFixture::test.

Here is the call graph for this function:

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

Runs test suite.

Parameters:

  | runner | test runner
  | suite | test suite

Returns:
  0 if succeeded, -1 if error occurred.

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

run test suite and collect its results.

Parameters:

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

Returns:
  test result.

Referenced by doRun().

Here is the caller graph for this function:

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