14 typedef bool TEST_CASE;
16 #define COMMENT(msg) \
17 printf(" ----- %s\n", msg);
21 printf(" FAIL: %s\n", msg); \
26 printf(" OK : %s\n", msg);
30 printf(" OK : %s\n", #t); \
33 printf(" FAIL: %s\n", #t); \
37 #define TEST_MSG(t,msg) \
39 printf(" OK : %s\n", msg); \
42 printf(" FAIL: %s\n", msg); \
47 bool test_delete_file(
const char *filename);
49 #define TEST_DELETE_FILE(file) \
50 if (test_delete_file(file)) \
51 printf(" OK : '%s' was removed\n", file); \
54 printf(" FAIL: cannot remove file '%s'\n", file); \
60 bool test_filediff(
const char *filename1,
const char *filename2);
62 #define TEST_FILEDIFF(file1,file2) \
63 if (test_filediff(file1,file2)) \
64 printf(" OK : '%s' and '%s' match\n", file1, file2); \
67 printf(" FAIL: diff %s %s\n", file1, file2); \
71 #define TEST_OK return true