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

CFIX_ASSERT_STATUS

CFIX_ASSERT_STATUS

Synopsis

CFIX_ASSERT_STATUS may be used to check whether an expression yields a specific NTSTATUS. This macro is intended for kernel mode development.

Declaration
void CFIX_ASSERT_STATUS( 
  __in NTSTATUS ExpectedStatus, 
  __in NTSTATUS Expression 
  );
				
Usage example
CFIX_ASSERT_STATUS( 
  STATUS_SUCCESS, 
  KeWaitForSingleObject( 
    Thread, 
    Executive,
    KernelMode,
    FALSE,
    NULL ) );
				
Requirements

Table 7.6. 

 User ModeKernel Mode
Available sinceNot supported1.5
HeaderNot supportedDeclared in cfix.h
LibraryNot supportedLink to cfixkdrv.lib
IRQLN/ACallable at any IRQL