9. Unit Testing API

9.1. C Unit Testing API

All of the functions that take a msg parameter use a C char * that is the message to be displayed. There currently is no support for variable length arguments.

9.1.1. Pass Function

This prints a message for a successful test completion.

pass(msg);

9.1.2. Fail Function

This prints a message for an unsuccessful test completion.

fail(msg);

9.1.3. Untested Function

This prints a message for an test case that isn't run for some technical reason.

untested(msg);

9.1.4. Unresolved Function

This prints a message for an test case that is run, but there is no clear result. These output states require a human to look over the results to determine what happened.

unresolved(msg);

9.1.5. Totals Function

This prints out the total numbers of all the test state outputs.

totals();

9.2. C++ Unit Testing API

All of the methods that take a msg parameter use a C char * or STL string, that is the message to be displayed. There currently is no support for variable length arguments.

9.2.1. Pass Method

This prints a message for a successful test completion.

TestState::pass(msg);

9.2.2. Fail Method

This prints a message for an unsuccessful test completion.

TestState::fail(msg);

9.2.3. Untested Method

This prints a message for an test case that isn't run for some technical reason.

TestState::untested(msg);

9.2.4. Unresolved Method

This prints a message for an test case that is run, but there is no clear result. These output states require a human to look over the results to determine what happened.

TestState::unresolved(msg);

9.2.5. Totals Method

This prints out the total numbers of all the test state outputs.

TestState::totals();