Visual Assert – The Unit Testing Add-In for Visual C++
cfix – C/C++ Unit Testing for Win32 and NT
 
 

CFIX_FIXTURE_TEARDOWN

CFIX_FIXTURE_TEARDOWN

Synopsis

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.

Declaration
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()
				
Remarks

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]Note
For certain initialization work, it may be more advantageous to use a after-routine rather than a teardown routine.
Requirements

Table 7.23. 

 User ModeKernel Mode
Available since1.01.1
HeaderDeclared in cfix.hDeclared in cfix.h
IRQLN/ACalled at PASSIVE_LEVEL