9 #define ok(...) ok_at_loc(__FILE__, __LINE__, __VA_ARGS__, NULL)
10 #define pass(...) ok(1, ## __VA_ARGS__)
11 #define fail(...) ok(0, ## __VA_ARGS__)
13 #define dies_ok_common(code, for_death, ...) \
19 perror("fork error"); \
27 if (waitpid(cpid, NULL, 0) < 0) { \
28 perror("waitpid error"); \
31 int it_died = tap_test_died(0); \
32 if (!it_died) {code} \
33 ok(for_death ? it_died : !it_died, ## __VA_ARGS__); \
36 #define dies_ok(code, ...) dies_ok_common(code, 1, ## __VA_ARGS__)
37 #define lives_ok(code, ...) dies_ok_common(code, 0, ## __VA_ARGS__)
39 void plan (int tests);
\r
40 int ok_at_loc (const char *file, int line, int test, const char *fmt, ...);
\r
41 int diag (const char *fmt, ...);
\r
42 int note (const char *fmt, ...);
\r
43 int exit_status (void);
44 int tap_test_died (int b);
\r