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

Data Structures | Typedefs | Functions

# Tracking test execution

Collaboration diagram for Tracking test execution:

## Data Structures
struct | CCUnitTestListener
| A Listener for test progress. More...
struct | CCUnitTestResult
| Collects the results of a test case. More...
## Typedefs
typedef struct CCUnitTestListener | CCUnitTestListener
| A Listener for test progress.
typedef struct CCUnitTestResult | CCUnitTestResult
| Collects the results of a test case.
## Functions
CCUnitTestResult * | ccunit_newTestResult ()
| Construct TestResult.
void | ccunit_deleteTestResult (CCUnitTestResult *result)
| Destruct TestResult.
void | ccunit_addFailure (CCUnitTestResult *result, struct CCUnitTestFailure *failure)
| Adds a failure to the list of failures.
void | ccunit_addResultListener (CCUnitTestResult *result, CCUnitTestListener *listener)
| Registers a TestRunner as TestListener.
CCUnitListIterator * | ccunit_failures (CCUnitTestResult *result)
| Returns an Iterator for the failures.
size_t | ccunit_failureCount (CCUnitTestResult *result)
| Gets the number of detected failures.
bool | ccunit_wasSuccessful (CCUnitTestResult *result)
| Returns whether the entire test was successful or not.
void | ccunit_stopTest (CCUnitTestResult *result)
| Marks that the test run should stop.
size_t | ccunit_runCount (CCUnitTestResult *result)
| Gets the number of run tests.

## Typedef Documentation

typedef struct CCUnitTestListener CCUnitTestListener

A Listener for test progress.

Implementing the Observer pattern a CCUnitTestListener may be registered to a CCUnitTestResult to obtain information on the testing progress. Use specialized sub classes of CCUnitTestListener for text output.

See also:
  CCUnitTestResult

typedef struct CCUnitTestResult CCUnitTestResult

Collects the results of a test case.

This module use a CCUnitTestListener to be informed of the ongoing tests.

See also:
  CCUnitTest, CCUnitTestListener.

## Function Documentation

void ccunit_addFailure | ( | CCUnitTestResult * | result,
|  | struct CCUnitTestFailure * | failure |
| ) |  |  |

Adds a failure to the list of failures.

The passed in failed assertion caused the failure.

Parameters:

  | result | result object.
  | failure | failure.

Referenced by run(), and runTest().

Here is the caller graph for this function:

void ccunit_addResultListener | ( | CCUnitTestResult * | result,
|  | CCUnitTestListener * | listener |
| ) |  |  | `[inline]`

Registers a TestRunner as TestListener.

Parameters:

  | result | result object.
  | listener | adding listener.

Referenced by doRun().

Here is the caller graph for this function:

void ccunit_deleteTestResult | ( | CCUnitTestResult * | result | ) |

Destruct TestResult.

Parameters:

  | result | result object.

size_t ccunit_failureCount | ( | CCUnitTestResult * | result | ) | `[inline]`

Gets the number of detected failures.

Parameters:

  | result | result object.

Referenced by printFailures(), and printHeader().

Here is the caller graph for this function:

CCUnitListIterator * ccunit_failures | ( | CCUnitTestResult * | result | ) | `[inline]`

Returns an Iterator for the failures.

Parameters:

  | result | result object.

Referenced by printFailures().

Here is the caller graph for this function:

CCUnitTestResult * ccunit_newTestResult | ( |  | ) |

Construct TestResult.

Referenced by ccunit_runTestFixture(), and doRun().

Here is the caller graph for this function:

size_t ccunit_runCount | ( | CCUnitTestResult * | result | ) | `[inline]`

Gets the number of run tests.

Parameters:

  | result | result object.

Referenced by printHeader().

Here is the caller graph for this function:

void ccunit_stopTest | ( | CCUnitTestResult * | result | ) | `[inline]`

Marks that the test run should stop.

Parameters:

  | result | result object.

bool ccunit_wasSuccessful | ( | CCUnitTestResult * | result | ) | `[inline]`

Returns whether the entire test was successful or not.

Parameters:

  | result | result object.

Referenced by doRun(), and printHeader().

Here is the caller graph for this function:

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