-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.h
More file actions
35 lines (32 loc) · 1.91 KB
/
utils.h
File metadata and controls
35 lines (32 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#define ok(expr) \
do { \
if (!((expr) || fake_mode)) { \
printf("[%d]Assertion failed: " #expr " at line %d\n", tCnt, \
__LINE__); \
if (!cont) exit(-1); \
} else { \
printf("[%d]Ok: " #expr " at line %d\n", tCnt, __LINE__); \
tCnt++; \
} \
} while (0)
#define dotOk(expr) \
do { \
if (!((expr) || fake_mode)) { \
printf("X==>FAILED!\n"); \
printf("[%d]Assertion failed: " #expr " at line %d\n", tCnt, \
__LINE__); \
if (!cont) exit(-1); \
} else { \
printf("."); \
fflush(stdout); \
tCnt++; \
} \
} while (0)
#define dotDone() \
do { \
printf("\nTotal: %d Ok\n", tCnt); \
} while (0)
#define finish() \
do { \
printf("\nTest Ends.\n"); \
} while (0)