A test group is a set of tests that we consider related, or example: all the tests of a single C function applied to a single category of operands. We create and run test group as follows:
cctests_begin_group("spiffy tests"); { cctests_run(test_this); cctests_run(test_that); } cctests_end_group();
CCTests’s API allows us to select which groups to run in a test program using the
environment variable cctests_group
.
Begin a group of tests; initialise the internal state. The argument is an ASCIIZ string representing the name of this group. Print a message on the log stream to report the operation.
The test group name is used as follows:
cctests_group
: this function initialises the group and returns. This way the test group is
executed. If cctests_group
is unset or set to the empty string: the test group name matches
and the tests are executed.
cctests_end_group()
.
End the latest group of tests begun with cctests_begin_group()
; finalise the internal state.
Print a message on the log stream to report the operation.
Return true
if the latest test group has completed successfully; otherwise return false
.
This document describes version 0.4.1-devel.1 of CCTests.