43 #if ! defined( NDEBUG ) && ! defined( CI_DISABLE_ASSERTS )
49 namespace cinder {
namespace detail {
50 void assertionFailedBreak(
char const *expr,
char const *
function,
char const *file,
long line );
55 #if defined( CI_ASSERT_DEBUG_BREAK )
57 #define CI_ASSERT( expr ) ( (expr) ? ( (void)0) : ::cinder::detail::assertionFailedBreak( #expr, CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) )
58 #define CI_ASSERT_MSG( expr, msg ) ( (expr) ? ( (void)0) : ::cinder::detail::assertionFailedMessageBreak( #expr, msg, CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) )
60 #elif defined( CI_ENABLE_ASSERT_HANDLER )
65 void assertionFailed(
char const *expr,
char const *
function,
char const *file,
long line );
67 void assertionFailedMessage(
char const *expr,
char const *msg,
char const *
function,
char const *file,
long line );
70 #define CI_ASSERT( expr ) ( (expr) ? ( (void)0) : ::cinder::assertionFailed( #expr, CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) )
71 #define CI_ASSERT_MSG( expr, msg ) ( (expr) ? ( (void)0) : ::cinder::assertionFailedMessage( #expr, msg, CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) )
73 #else // defined( CI_ENABLE_ASSERT_HANDLER )
75 #define CI_ASSERT( expr ) assert( expr )
76 #define CI_ASSERT_MSG( expr, msg ) ( (expr) ? ( (void)0) : ::cinder::detail::assertionFailedMessageAbort( #expr, msg, CINDER_CURRENT_FUNCTION, __FILE__, __LINE__ ) )
78 #endif // defined( CI_ASSERT_DEBUG_BREAK )
80 #define CI_VERIFY( expr ) CI_ASSERT( expr )
81 #define CI_VERIFY_MSG( expr, msg ) CI_ASSERT_MSG( expr, msg )
83 #define CI_ASSERT_NOT_REACHABLE() CI_ASSERT_MSG( 0, "not reachable" )
87 #define CI_ASSERT( expr ) ( (void)0 )
88 #define CI_ASSERT_MSG( expr, msg ) ( (void)0 )
89 #define CI_VERIFY( expr ) ( (void)(expr) )
90 #define CI_VERIFY_MSG( expr, msg ) ( (void)(expr) )
92 #define CI_ASSERT_NOT_REACHABLE() ( (void)0 )
void assertionFailedMessageBreak(char const *expr, char const *msg, char const *function, char const *file, long line)
Definition: CinderAssert.cpp:42
void assertionFailedBreak(char const *expr, char const *function, char const *file, long line)
Definition: CinderAssert.cpp:31
void assertionFailedMessageAbort(char const *expr, char const *msg, char const *function, char const *file, long line)
Definition: CinderAssert.cpp:53