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

CFIX_ASSERT_HRESULT

CFIX_ASSERT_HRESULT

Synopsis

CFIX_ASSERT_HRESULT may be used to check whether an expression yields a specific HRESULT. This macro is primarily intended for COM development.

Declaration
void CFIX_ASSERT_HRESULT( 
  __in HRESULT ExpectedHResult, 
  __in HRESULT Expression 
  );
				
Usage example
CFIX_ASSERT_HRESULT(
  E_NOINTERFACE,
  Obj->QueryInterface( IID_INonExisting, ( PVOID* ) &Unk ) );
				
Requirements

Table 7.5. 

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