7 #define _END } while(0);
9 /* msg must be a string literal */
10 #define _ASSERT(expr, msg, ...) _BEGIN \
12 fprintf(stderr, "Assertion failed: " msg "\n", __VA_ARGS__); \
16 #define SUCCEED _BEGIN return 1; _END
17 #define ASSERT(expr) _ASSERT(expr, "%s", #expr)
18 #define ASSERT_EQUAL(expected, actual) _ASSERT((expected) == (actual), "%s == %s", #expected, #actual);
20 struct TestDescription {
22 int (*testfunc)(void);
25 #endif /* GLKUNIT_H */