1 #ifndef _UTEST_COMMON_H_
2 #define _UTEST_COMMON_H_
7 #define TEST_REL_(_ty, _fmt, exp, rel, have) do { \
11 fprintf(stderr, "TEST_REL_INT("#exp" {%"_fmt"} "#rel" "#have" {%"_fmt"}) FAILED\n", \
16 #define TEST_REL_INT(exp, rel, have) TEST_REL_(int, "i", exp, rel, have)
17 #define TEST_REL_PTR(exp, rel, have) TEST_REL_(const void*, "p", exp, rel, have)
19 // -- Header hooks (allowing inclusion of general headers)
20 #define SYSCALL(rt, name) rt name() { fprintf(stderr, "BUG: Calling syscall '"#name"' in unit test\n"); exit(2); }