add_checked_fixture
Description:
public void add_checked_fixture (SFun? setup = null, SFun? teardown = null)
Add checked fixture setup/teardown functions to a test case
Checked fixture functions are run before and after each unit test inside of the address space of the test. Thus, if using CK_FORK mode the separate process running the unit test will survive signals or unexpected exits in the fixture function. Also, if the setup function is idempotent, unit test behavior will be the same in CK_FORK and CK_NOFORK modes.
However, since fixture functions are run before and after each unit test, they should not be expensive code.
Note that if a setup function fails, the remaining setup functions will be omitted, as will the test and the teardown functions. If a teardown function fails the remaining teardown functins will be omitted.
Parameters:
setup |
function to add to be executed before each unit test in the test case; if NULL no setup function is added |
teardown |
function to add to be executed after each unit test in the test case; if NULL no teardown function is added |
Since:
0.8.0