- #define wxASSERT_MSG(cond, msg) \
- wxAssert(!!(cond), __TFILE__, __LINE__, _T(#cond), msg)
+ #define wxASSERT_MSG(cond, msg) \
+ if ( cond ) \
+ ; \
+ else \
+ wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg)
+
+ /* special form of assert: always triggers it (in debug mode) */
+ #define wxFAIL wxFAIL_MSG(NULL)
+
+ /* FAIL with some message */
+ #define wxFAIL_MSG(msg) wxFAIL_COND_MSG("wxAssertFailure", msg)
+
+ /* FAIL with some message and a condition */
+ #define wxFAIL_COND_MSG(cond, msg) \
+ wxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(cond), msg)