diff --git a/tests/testutil.h b/tests/testutil.h index 06009a6..be17807 100644 --- a/tests/testutil.h +++ b/tests/testutil.h @@ -54,6 +54,11 @@ void exit(int __status) #define RUN_TEST(fun) __run_test(fun, #fun); #define END_TEST() __print_test_result(__FILE__); + +// temporarily silence clang warnings about assert redefinition +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmacro-redefined" + #define __assert(c) do { \ if (!(c)) { \ fprintf(stderr, "Assertion error '%s' in %s:%d\n", #c, __FILE__, __LINE__); \ @@ -64,6 +69,8 @@ void exit(int __status) #define assert(c) __assert(c); +#pragma clang diagnostic pop + void steps(ijvm* m, int n); static int __passed_test_counter = 0;