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

CFIX_FIXTURE_SETUP

CFIX_FIXTURE_SETUP

Synopsis

Used to specify a routine that is to be used as setup routine. The setup routine will be called once, before any of the test routnes are executed.

Specifying CFIX_FIXTURE_SETUP is optional. Note, however, that CFIX_FIXTURE_SETUP may be used at most once per fixture definition.

See here for an example of a complete fixture definition.

Declaration
CFIX_FIXTURE_SETUP( Routine )
				

Setup routines must have the following signature. Specifying __stdcall is only required if /Gz is not used as compiler switch.

void __stdcall SetupRoutine()
				
Remarks

If the setup routine fails, none of the test routines will be executed. The teardown routine will not be invoked either.

[Note]Note
For certain initialization work, it may be more advantageous to use a before-routine rather than a setup routine.
Requirements

Table 7.22. 

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