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

SETUP

SETUP

Synopsis

Used to implement a setup routine. This routine will be called once per test routine, before the test routine itself is invoked. As such, setup routines should be used to initialize any state (i.e. static variables, environment) required by the test routines.

Using SETUP to implement a setup routine for a fixture is optional. Note, however, that at most one setup routine may be defined per fixture.

[Note]Note
WinUnit setup routines correspond to and have the same semantics as before routines in the cfix API.
Declaration
SETUP( FixtureName )
			
Parameters

[in] FixtureName Name of the fixture to assign the setup routine to. The fixture (and its name) must have been defined previously using FIXTURE.

Usage example
FIXTURE( TestFixture );

SETUP( TestFixture )
{    
  WIN_TRACE( L"Setting up" );
}
			
Requirements

Table 7.56. 

 User ModeKernel Mode
Available since1.3N/A
HeaderDeclared in winunit.hN/A
LibraryLink to cfix.libN/A
DLLcfix.dllN/A
IRQLN/AN/A