mirror of https://github.com/lianthony/NT4.0
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.
32 lines
582 B
32 lines
582 B
//
|
|
// Debug.h
|
|
//
|
|
|
|
#ifdef _DEBUG
|
|
BOOL AssertFailedLine(LPCSTR lpszFileName, int nLine);
|
|
#define DebugBreak() _asm { int 3 }
|
|
#define THIS_FILE __FILE__
|
|
#undef ASSERT
|
|
#define ASSERT(f) \
|
|
do \
|
|
{ \
|
|
if (!(f) && AssertFailedLine(THIS_FILE, __LINE__)) \
|
|
DebugBreak(); \
|
|
} while (0) \
|
|
|
|
#define VERIFY(f) ASSERT(f)
|
|
#define DEBUG_ONLY(f) (f)
|
|
#define NYI() ASSERT(FALSE);
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _DEBUG
|
|
#define ASSERT(f) ((void)0)
|
|
#define VERIFY(f) ((void)(f))
|
|
#define DEBUG_ONLY(f) ((void)0)
|
|
#define NYI() _asm { int 3 }
|
|
#endif
|
|
|
|
|
|
#define GOOD(f) VERIFY((f) == S_OK)
|