add: testcases for refs #885, refs #1031

This commit is contained in:
Ken Sato
2018-03-01 10:24:21 +09:00
parent 140f813d77
commit afcf1a24aa
27 changed files with 1677 additions and 5 deletions

View File

@ -0,0 +1,25 @@
#ifndef HEADER_TEST_CHK_H
#define HEADER_TEST_CHK_H
#define CHKANDJUMP(cond, ...) \
do { \
if (cond) { \
fprintf(stderr, " [NG] "); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, " failed\n"); \
goto fn_fail; \
} \
} while(0);
#define OKNG(cond, ...) \
do { \
if (cond) { \
CHKANDJUMP(cond, __VA_ARGS__); \
} else { \
fprintf(stdout, " [OK] "); \
fprintf(stdout, __VA_ARGS__); \
fprintf(stdout, "\n"); \
} \
} while(0);
#endif