CFIX_FIXTURE_TEARDOWN
Used to specify a routine that is to be used as teardown routine. The teardown routine will be called once, after all of the test routnes are executed.
Specifying CFIX_FIXTURE_TEARDOWN is optional. Note, however, that CFIX_FIXTURE_TEARDOWN may be used at most once per fixture definition.
See here for an example of a complete fixture definition.
CFIX_FIXTURE_TEARDOWN( Routine )
Teardown routines must have the following signature. Specifying __stdcall is only required if /Gz is not used as compiler switch.
void __stdcall TeardownRoutine()
The teardown routine will be called regardless of whether the test routines succeeded or not. The only situation in which the teardown routine is not called is when the setup routine has failed.
![]() | Note |
---|---|
For certain initialization work, it may be more advantageous to use a after-routine rather than a teardown routine. |