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

CFIX_ASSERT_FAILED

CFIX_ASSERT_FAILED

Synopsis

CFIX_ASSERT_FAILED may be used to check whether an expression yields a failure HRESULT. This macro is primarily intended for COM development and is a shorthand for writing CFIX_ASSERT( FAILED( Expression ) )

Declaration
void CFIX_ASSERT_FAILED( __in HRESULT Expression );
				
Usage example
CFIX_ASSERT_FAILED(
  Factory->CreateInstance( NULL, IID_INonExisting, ( PVOID* ) &Unk ) );
				
Requirements

Table 7.4. 

 User ModeKernel Mode
Available since1.4Not supported
HeaderDeclared in cfix.hNot supported
LibraryLink to cfix.libNot supported
DLLcfix.dllNot supported