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

WIN_ASSERT_FALSE

WIN_ASSERT_FALSE

Synopsis

WIN_ASSERT_FALSE checks whether a given expression evaluates to FALSE.

Declaration
void WIN_ASSERT_FALSE( 
	__in BOOL Expression, 
	...
	);
			
Parameters

[in] Expression: The expression whose value is to be checked.

[in] ...: Optional: Message to be included in a failure report. This parameter allows printf-style formatters to be used, with the corresponding parameters being specified as subsequent arguments. The routine is overloaded and allows Message to be either a unicode or an ANSI string.

Usage example
int a = 0;
WIN_ASSERT_FALSE( FALSE, "Test a Win32 BOOL" );
WIN_ASSERT_FALSE( false, L"Test a C++ bool" );
WIN_ASSERT_FALSE( a != 0 );
			
Requirements

Table 7.51. 

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

Requires cl version 14.00 (VisualStudio 2005) or better.