assert.h File Reference
#include <iostream>
#include <cstdlib>

Go to the source code of this file.

Macros

#define INTEROP_ASSERT(TST)
 
#define INTEROP_ASSERTMSG(TST, MSG)
 

Detailed Description

Assert macros

This header file provides enhanced assert macros to make debugging easier.

Date
10/28/15
Version
1.0

Macro Definition Documentation

#define INTEROP_ASSERT (   TST)
Value:
if(!(TST)) {\
std::cerr << __FILE__<< "::" << __FUNCTION__<< " (" << __LINE__ << ")" << " " #TST << std::endl;\
std::abort();\
}

Assert if test is true

If the test fails, then print the file, function and number number along with the test and call abort.

Note
Do nothing in release mode.
#define INTEROP_ASSERTMSG (   TST,
  MSG 
)
Value:
if(!(TST)) {\
std::cerr << __FILE__<< "::" << __FUNCTION__<< " (" << __LINE__ << ")" << " " #TST << " " << MSG << std::endl;\
std::abort();\
}

Assert if test is true

If the test fails, then print the file, function and number number along with the test and a message; then call abort.

Note
Do nothing in release mode.