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

TEARDOWN

TEARDOWN

Synopsis

Used to implement a teardown routine. This routine will be called once per test routine, after the test routine itself has completed. As such, teardown routines should be used to clean up any state that has been set up by SETUP and test routines.

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

[Note]Note
WinUnit teardown routines correspond to and have the same semantics as after routines in the cfix API.
Declaration
TEARDOWN( FixtureName )
			
Parameters

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

Usage example
FIXTURE( TestFixture );

TEARDOWN( TestFixture )
{    
  WIN_TRACE( L"Tearing down" );
}
			
Requirements

Table 7.57. 

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