diff --git a/tests/libs/CHECK.h b/tests/libs/CHECK.h index 2575d5b79..5870b0731 100644 --- a/tests/libs/CHECK.h +++ b/tests/libs/CHECK.h @@ -20,7 +20,15 @@ // should probably avoid dependencies other than ones we're specifically // trying to test. -#include +#include +#include + +static inline void check_failure(const char* file, int line, const char* function, + const char* failed_expression) { + fprintf(stderr, "%s:%d: %s: assertion \"%s\" failed\n", file, line, function, failed_expression); + fflush(stderr); + abort(); +} #define CHECK(e) \ - ((e) ? static_cast(0) : __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, #e)) + ((e) ? static_cast(0) : check_failure(__FILE__, __LINE__, __PRETTY_FUNCTION__, #e))