home *** CD-ROM | disk | FTP | other *** search
- //
- // $Id: Assert.h,v 1.1.1.1 2000/06/02 22:23:02 sergey Exp $
- //
-
- #ifndef _Assert_h_
- #define _Assert_h_
-
-
- #ifdef DEBUG
-
- namespace Util
- {
- void DebugMessage(const char* file, int line, const char* format, ...);
- void DebugPrintf(const char* format, ...);
- }
-
- #define assert(cond) \
- ((cond)? (void)0 : Util::DebugMessage(__FILE__, __LINE__, "Assertion failed: " #cond))
-
- #define assertf(cond, format, args...) \
- ((cond)? (void)0 : Util::DebugMessage(__FILE__, __LINE__, (format), ##args))
-
- #else // DEBUG
-
- #define assert(cond) ((void)0)
- #define assertf(cond, format, args...) ((void)0)
-
- #endif // DEBUG
-
- #endif // _Assert_h_
-