#include #define XTEST_XASSERT #if defined(XTEST_XTEST_H) && !defined(XTEST_SOURCE) #error "do not include xtest.h and xassert.h at the same time. xassert.h should only be included from your source files and xtest.h should only be included from your test files." #endif #if defined(XTEST) && (!defined(XTEST_XTEST_H) || defined(XTEST_SOURCE)) void xtest_internal_assert(const char* file, int line, const char* func, const char* expr); #undef assert #define assert(__e) ((__e) ? (void)0 : xtest_internal_assert(__FILE__, __LINE__, \ __func__, #__e)) #endif //defined(XTEST) && !defined(XTEST_XTEST_H)