Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

40 lines
1.1 KiB

//+----------------------------------------------------------------------------
// File: debug.hxx
//
// Synopsis: Debug macros, classes, and helpers
//
//-----------------------------------------------------------------------------
#ifndef _DEBUG_HXX
#define _DEBUG_HXX
// Macros ---------------------------------------------------------------------
// Debug macros/routines
#ifdef _DEBUG
#define Assert(x) { \
if (!(x) && (1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #x))) \
_CrtDbgBreak(); \
}
#define AssertF(x) { \
if (1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, #x)) \
_CrtDbgBreak(); \
}
#define Implies(x,y) Assert((!x)||(y))
#define Verify(x) Assert(x)
#define Debug(x) x
// Non-Debug macros/routines
#else
#define Assert(x)
#define AssertF(x)
#define Implies(x,y)
#define Verify(x) x
#define Debug(x)
#endif
#endif // _DEBUG_HXX