21 #ifndef LELY_TAP_TAP_H_ 22 #define LELY_TAP_TAP_H_ 27 #pragma GCC diagnostic ignored "-Wformat-zero-length" 28 #pragma GCC diagnostic ignored "-Wformat-extra-args" 38 #define tap_plan(...) tap_plan_(__VA_ARGS__, "") 39 #define tap_plan_(n, ...) tap_plan_impl(n, "" __VA_ARGS__) 48 #define tap_test(...) tap_test_(__VA_ARGS__, "") 49 #define tap_test_(expr, ...) \ 50 tap_test_impl(!!(expr), #expr, __FILE__, __LINE__, "" __VA_ARGS__) 60 #define tap_pass(...) tap_test_impl(1, "", __FILE__, __LINE__, "" __VA_ARGS__) 70 #define tap_fail(...) tap_test_impl(0, "", __FILE__, __LINE__, "" __VA_ARGS__) 77 #define tap_todo(...) tap_todo_(__VA_ARGS__, "") 78 #define tap_todo_(expr, ...) \ 79 tap_test_impl(!!(expr), #expr, __FILE__, __LINE__, \ 80 " # TODO " __VA_ARGS__) 86 #define tap_skip(...) tap_skip_(__VA_ARGS__, "") 87 #define tap_skip_(expr, ...) tap_pass(" # SKIP " __VA_ARGS__) 94 #define tap_diag(...) tap_diag_impl("# " __VA_ARGS__) 102 #define tap_abort(...) tap_abort_impl("" __VA_ARGS__) 109 #define tap_assert(expr) \ 111 : tap_abort("%s:%d: Assertion `%s' failed.", __FILE__, \ 119 void tap_plan_impl(
int n,
const char *format, ...) format_printf__(2, 3);
120 int tap_test_impl(
int test,
const char *expr,
const char *
file,
int line,
121 const char *format, ...) format_printf__(5, 6);
122 void tap_diag_impl(
const char *format, ...) format_printf__(1, 2);
123 _Noreturn void tap_abort_impl(
const char *format, ...) format_printf__(1, 2);
129 #endif // !LELY_TAP_TAP_H_ This header file is part of the Lely libraries; it contains the compiler feature definitions.
#define _Noreturn
A function declared with a _Noreturn function specifier SHALL not return to its caller.