2022-01-03 16:17:25 +01:00
|
|
|
#if defined(__GNUC__) || defined(__clang__) || defined(XTEST_USE_INCLUDE_NEXT)
|
2022-01-11 20:01:15 +01:00
|
|
|
|
2022-01-03 16:17:25 +01:00
|
|
|
#include_next <assert.h>
|
2022-01-11 20:01:15 +01:00
|
|
|
|
2022-01-03 16:17:25 +01:00
|
|
|
#else
|
2022-01-02 15:00:54 +01:00
|
|
|
#include <assert.h>
|
2022-01-03 16:17:25 +01:00
|
|
|
#endif
|
2022-01-02 15:00:54 +01:00
|
|
|
|
|
|
|
#define XTEST_XASSERT
|
|
|
|
|
|
|
|
|
2022-01-03 16:17:25 +01:00
|
|
|
#if defined(XTEST) && !defined(XTEST_XTEST_H)
|
2022-01-02 15:00:54 +01:00
|
|
|
|
2022-01-11 20:01:15 +01:00
|
|
|
void xtest_internal_assert(const char *file, int line, const char *func, const char *expr);
|
2022-01-02 15:00:54 +01:00
|
|
|
|
|
|
|
#undef assert
|
|
|
|
|
|
|
|
#define assert(__e) ((__e) ? (void)0 : xtest_internal_assert(__FILE__, __LINE__, \
|
2022-01-11 20:01:15 +01:00
|
|
|
__func__, #__e))
|
2022-01-02 15:00:54 +01:00
|
|
|
|
|
|
|
#endif //defined(XTEST) && !defined(XTEST_XTEST_H)
|