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

BEGIN_TESTF

BEGIN_TESTF

Synopsis

BEGIN_TESTF is used to implement a test that is part of a fixture. It is similar to BEGIN_TEST, yet also adds the test to the corresponding fixture.

Declaration
BEGIN_TESTF( TestName, FixtureName )
			
Parameters

[in] TestName Name of the test routine. The name must be unique within the fixture and has to be a valid C++ identifier; it must follow the naming rules for functions.

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

Usage example
FIXTURE( TestFixture );

BEGIN_TESTF( Test01, TestFixture )
{
    WIN_ASSERT_THROWS(
		RaiseSimpleException(), 
		SimpleException,
        _T( "Expecting SimpleException" ) );
}
END_TESTF
			
[Note]Note
Note that END_TESTF must be used to mark the end of the test.
Requirements

Table 7.58. 

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