#ifndef GREATEST_H
#define GREATEST_H
#define GREATEST_VERSION_MAJOR 1
#define GREATEST_VERSION_MINOR 1
#define GREATEST_VERSION_PATCH 0
#if 0#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifndef GREATEST_DEFAULT_WIDTH
#define GREATEST_DEFAULT_WIDTH 72
#endif
#ifndef GREATEST_STDOUT
#define GREATEST_STDOUT stdout
#endif
#ifndef GREATEST_USE_ABBREVS
#define GREATEST_USE_ABBREVS 1
#endif
#ifndef GREATEST_USE_LONGJMP
#define GREATEST_USE_LONGJMP 1
#endif
#if GREATEST_USE_LONGJMP
#include <setjmp.h>
#endif
#ifndef GREATEST_USE_TIME
#define GREATEST_USE_TIME 1
#endif
#if GREATEST_USE_TIME
#include <time.h>
#endif
#ifndef GREATEST_FLOAT
#define GREATEST_FLOAT double
#define GREATEST_FLOAT_FMT "%g"
#endif
typedef struct greatest_suite_info {
unsigned int tests_run;
unsigned int passed;
unsigned int failed;
unsigned int skipped;
#if GREATEST_USE_TIME
clock_t pre_suite;
clock_t post_suite;
clock_t pre_test;
clock_t post_test;
#endif
} greatest_suite_info;
typedef void (greatest_suite_cb)(void);
typedef void (greatest_setup_cb)(void *udata);
typedef void (greatest_teardown_cb)(void *udata);
typedef int greatest_equal_cb(const void *exp, const void *got, void *udata);
typedef int greatest_printf_cb(const void *t, void *udata);
typedef struct greatest_type_info {
greatest_equal_cb *equal;
greatest_printf_cb *print;
} greatest_type_info;
extern greatest_type_info greatest_type_info_string;
typedef enum {
GREATEST_FLAG_FIRST_FAIL = 0x01,
GREATEST_FLAG_LIST_ONLY = 0x02
} greatest_flag_t;
typedef struct greatest_run_info {
unsigned char flags;
unsigned char verbosity;
unsigned int tests_run;
unsigned int passed;
unsigned int failed;
unsigned int skipped;
unsigned int assertions;
greatest_suite_info suite;
const char *fail_file;
unsigned int fail_line;
const char *msg;
greatest_setup_cb *setup;
void *setup_udata;
greatest_teardown_cb *teardown;
void *teardown_udata;
unsigned int col;
unsigned int width;
const char *suite_filter;
const char *test_filter;
#if GREATEST_USE_TIME
clock_t begin;
clock_t end;
#endif
#if GREATEST_USE_LONGJMP
jmp_buf jump_dest;
#endif
} greatest_run_info;
struct greatest_report_t {
unsigned int passed;
unsigned int failed;
unsigned int skipped;
unsigned int assertions;
};
extern greatest_run_info greatest_info;
void greatest_do_pass(const char *name);
void greatest_do_fail(const char *name);
void greatest_do_skip(const char *name);
int greatest_pre_test(const char *name);
void greatest_post_test(const char *name, int res);
void greatest_usage(const char *name);
int greatest_do_assert_equal_t(const void *exp, const void *got,
greatest_type_info *type_info, void *udata);
void GREATEST_SET_SETUP_CB(greatest_setup_cb *cb, void *udata);
void GREATEST_SET_TEARDOWN_CB(greatest_teardown_cb *cb, void *udata);
int greatest_all_passed(void);
void greatest_set_test_filter(const char *name);
void greatest_set_suite_filter(const char *name);
void greatest_get_report(struct greatest_report_t *report);
unsigned int greatest_get_verbosity(void);
void greatest_set_verbosity(unsigned int verbosity);
void greatest_set_flag(greatest_flag_t flag);
#if __STDC_VERSION__ >= 19901L || _MSC_VER >= 1800
#define GREATEST_VA_ARGS
#endif
#define GREATEST_SUITE(NAME) void NAME(void); void NAME(void)
#define GREATEST_SUITE_EXTERN(NAME) void NAME(void)
#define GREATEST_TEST static greatest_test_res
typedef enum {
GREATEST_TEST_RES_PASS = 0,
GREATEST_TEST_RES_FAIL = -1,
GREATEST_TEST_RES_SKIP = 1
} greatest_test_res;
#define GREATEST_RUN_SUITE(S_NAME) greatest_run_suite(S_NAME, #S_NAME)
#define GREATEST_RUN_TEST(TEST) \
do { \
if (greatest_pre_test(#TEST) == 1) { \
greatest_test_res res = GREATEST_SAVE_CONTEXT(); \
if (res == GREATEST_TEST_RES_PASS) { \
res = TEST(); \
} \
greatest_post_test(#TEST, res); \
} else if (GREATEST_LIST_ONLY()) { \
fprintf(GREATEST_STDOUT, " %s\n", #TEST); \
} \
} while (0)
#define GREATEST_RUN_TEST1(TEST, ENV) \
do { \
if (greatest_pre_test(#TEST) == 1) { \
int res = TEST(ENV); \
greatest_post_test(#TEST, res); \
} else if (GREATEST_LIST_ONLY()) { \
fprintf(GREATEST_STDOUT, " %s\n", #TEST); \
} \
} while (0)
#ifdef GREATEST_VA_ARGS
#define GREATEST_RUN_TESTp(TEST, ...) \
do { \
if (greatest_pre_test(#TEST) == 1) { \
int res = TEST(__VA_ARGS__); \
greatest_post_test(#TEST, res); \
} else if (GREATEST_LIST_ONLY()) { \
fprintf(GREATEST_STDOUT, " %s\n", #TEST); \
} \
} while (0)
#endif
#define GREATEST_IS_VERBOSE() ((greatest_info.verbosity) > 0)
#define GREATEST_LIST_ONLY() \
(greatest_info.flags & GREATEST_FLAG_LIST_ONLY)
#define GREATEST_FIRST_FAIL() \
(greatest_info.flags & GREATEST_FLAG_FIRST_FAIL)
#define GREATEST_FAILURE_ABORT() \
(greatest_info.suite.failed > 0 && GREATEST_FIRST_FAIL())
#define GREATEST_PASS() GREATEST_PASSm(NULL)
#define GREATEST_FAIL() GREATEST_FAILm(NULL)
#define GREATEST_SKIP() GREATEST_SKIPm(NULL)
#define GREATEST_ASSERT(COND) \
GREATEST_ASSERTm(#COND, COND)
#define GREATEST_ASSERT_OR_LONGJMP(COND) \
GREATEST_ASSERT_OR_LONGJMPm(#COND, COND)
#define GREATEST_ASSERT_FALSE(COND) \
GREATEST_ASSERT_FALSEm(#COND, COND)
#define GREATEST_ASSERT_EQ(EXP, GOT) \
GREATEST_ASSERT_EQm(#EXP " != " #GOT, EXP, GOT)
#define GREATEST_ASSERT_EQ_FMT(EXP, GOT, FMT) \
GREATEST_ASSERT_EQ_FMTm(#EXP " != " #GOT, EXP, GOT, FMT)
#define GREATEST_ASSERT_IN_RANGE(EXP, GOT, TOL) \
GREATEST_ASSERT_IN_RANGEm(#EXP " != " #GOT " +/- " #TOL, EXP, GOT, TOL)
#define GREATEST_ASSERT_EQUAL_T(EXP, GOT, TYPE_INFO, UDATA) \
GREATEST_ASSERT_EQUAL_Tm(#EXP " != " #GOT, EXP, GOT, TYPE_INFO, UDATA)
#define GREATEST_ASSERT_STR_EQ(EXP, GOT) \
GREATEST_ASSERT_STR_EQm(#EXP " != " #GOT, EXP, GOT)
#define GREATEST_ASSERTm(MSG, COND) \
do { \
greatest_info.assertions++; \
if (!(COND)) { GREATEST_FAILm(MSG); } \
} while (0)
#define GREATEST_ASSERT_OR_LONGJMPm(MSG, COND) \
do { \
greatest_info.assertions++; \
if (!(COND)) { GREATEST_FAIL_WITH_LONGJMPm(MSG); } \
} while (0)
#define GREATEST_ASSERT_FALSEm(MSG, COND) \
do { \
greatest_info.assertions++; \
if ((COND)) { GREATEST_FAILm(MSG); } \
} while (0)
#define GREATEST_ASSERT_EQm(MSG, EXP, GOT) \
do { \
greatest_info.assertions++; \
if ((EXP) != (GOT)) { GREATEST_FAILm(MSG); } \
} while (0)
#define GREATEST_ASSERT_EQ_FMTm(MSG, EXP, GOT, FMT) \
do { \
const char *fmt = ( FMT ); \
greatest_info.assertions++; \
if ((EXP) != (GOT)) { \
fprintf(GREATEST_STDOUT, "\nExpected: "); \
fprintf(GREATEST_STDOUT, fmt, EXP); \
fprintf(GREATEST_STDOUT, "\nGot: "); \
fprintf(GREATEST_STDOUT, fmt, GOT); \
fprintf(GREATEST_STDOUT, "\n"); \
GREATEST_FAILm(MSG); \
} \
} while (0)
#define GREATEST_ASSERT_IN_RANGEm(MSG, EXP, GOT, TOL) \
do { \
GREATEST_FLOAT exp = (EXP); \
GREATEST_FLOAT got = (GOT); \
GREATEST_FLOAT tol = (TOL); \
greatest_info.assertions++; \
if ((exp > got && exp - got > tol) || \
(exp < got && got - exp > tol)) { \
fprintf(GREATEST_STDOUT, \
"\nExpected: " GREATEST_FLOAT_FMT \
" +/- " GREATEST_FLOAT_FMT "\n" \
"Got: " GREATEST_FLOAT_FMT "\n", \
exp, tol, got); \
GREATEST_FAILm(MSG); \
} \
} while (0)
#define GREATEST_ASSERT_STR_EQm(MSG, EXP, GOT) \
do { \
GREATEST_ASSERT_EQUAL_Tm(MSG, EXP, GOT, \
&greatest_type_info_string, NULL); \
} while (0) \
#define GREATEST_ASSERT_EQUAL_Tm(MSG, EXP, GOT, TYPE_INFO, UDATA) \
do { \
greatest_type_info *type_info = (TYPE_INFO); \
greatest_info.assertions++; \
if (!greatest_do_assert_equal_t(EXP, GOT, \
type_info, UDATA)) { \
if (type_info == NULL || type_info->equal == NULL) { \
GREATEST_FAILm("type_info->equal callback missing!"); \
} else { \
GREATEST_FAILm(MSG); \
} \
} \
} while (0) \
#define GREATEST_PASSm(MSG) \
do { \
greatest_info.msg = MSG; \
return GREATEST_TEST_RES_PASS; \
} while (0)
#define GREATEST_FAILm(MSG) \
do { \
greatest_info.fail_file = __FILE__; \
greatest_info.fail_line = __LINE__; \
greatest_info.msg = MSG; \
return GREATEST_TEST_RES_FAIL; \
} while (0)
#if GREATEST_USE_LONGJMP
#define GREATEST_FAIL_WITH_LONGJMP() GREATEST_FAIL_WITH_LONGJMPm(NULL)
#define GREATEST_FAIL_WITH_LONGJMPm(MSG) \
do { \
greatest_info.fail_file = __FILE__; \
greatest_info.fail_line = __LINE__; \
greatest_info.msg = MSG; \
longjmp(greatest_info.jump_dest, GREATEST_TEST_RES_FAIL); \
} while (0)
#endif
#define GREATEST_SKIPm(MSG) \
do { \
greatest_info.msg = MSG; \
return GREATEST_TEST_RES_SKIP; \
} while (0)
#define GREATEST_CHECK_CALL(RES) \
do { \
int _check_call_res = RES; \
if (_check_call_res != GREATEST_TEST_RES_PASS) { \
return _check_call_res; \
} \
} while (0) \
#if GREATEST_USE_TIME
#define GREATEST_SET_TIME(NAME) \
NAME = clock(); \
if (NAME == (clock_t) -1) { \
fprintf(GREATEST_STDOUT, \
"clock error: %s\n", #NAME); \
exit(EXIT_FAILURE); \
}
#define GREATEST_CLOCK_DIFF(C1, C2) \
fprintf(GREATEST_STDOUT, " (%lu ticks, %.3f sec)", \
(long unsigned int) (C2) - (long unsigned int)(C1), \
(double)((C2) - (C1)) / (1.0 * (double)CLOCKS_PER_SEC))
#else
#define GREATEST_SET_TIME(UNUSED)
#define GREATEST_CLOCK_DIFF(UNUSED1, UNUSED2)
#endif
#if GREATEST_USE_LONGJMP
#define GREATEST_SAVE_CONTEXT() \
\
\
((greatest_test_res)(setjmp(greatest_info.jump_dest)))
#else
#define GREATEST_SAVE_CONTEXT() \
\
GREATEST_TEST_RES_PASS
#endif
#define GREATEST_MAIN_DEFS() \
\
\
static int greatest_name_match(const char *name, \
const char *filter) { \
size_t offset = 0; \
size_t filter_len = strlen(filter); \
while (name[offset] != '\0') { \
if (name[offset] == filter[0]) { \
if (0 == strncmp(&name[offset], filter, filter_len)) { \
return 1; \
} \
} \
offset++; \
} \
\
return 0; \
} \
\
int greatest_pre_test(const char *name) { \
if (!GREATEST_LIST_ONLY() \
&& (!GREATEST_FIRST_FAIL() || greatest_info.suite.failed == 0) \
&& (greatest_info.test_filter == NULL || \
greatest_name_match(name, greatest_info.test_filter))) { \
GREATEST_SET_TIME(greatest_info.suite.pre_test); \
if (greatest_info.setup) { \
greatest_info.setup(greatest_info.setup_udata); \
} \
return 1; \
} else { \
return 0; \
} \
} \
\
void greatest_post_test(const char *name, int res) { \
GREATEST_SET_TIME(greatest_info.suite.post_test); \
if (greatest_info.teardown) { \
void *udata = greatest_info.teardown_udata; \
greatest_info.teardown(udata); \
} \
\
if (res <= GREATEST_TEST_RES_FAIL) { \
greatest_do_fail(name); \
} else if (res >= GREATEST_TEST_RES_SKIP) { \
greatest_do_skip(name); \
} else if (res == GREATEST_TEST_RES_PASS) { \
greatest_do_pass(name); \
} \
greatest_info.suite.tests_run++; \
greatest_info.col++; \
if (GREATEST_IS_VERBOSE()) { \
GREATEST_CLOCK_DIFF(greatest_info.suite.pre_test, \
greatest_info.suite.post_test); \
fprintf(GREATEST_STDOUT, "\n"); \
} else if (greatest_info.col % greatest_info.width == 0) { \
fprintf(GREATEST_STDOUT, "\n"); \
greatest_info.col = 0; \
} \
if (GREATEST_STDOUT == stdout) fflush(stdout); \
} \
\
static void report_suite(void) { \
if (greatest_info.suite.tests_run > 0) { \
fprintf(GREATEST_STDOUT, \
"\n%u test%s - %u passed, %u failed, %u skipped", \
greatest_info.suite.tests_run, \
greatest_info.suite.tests_run == 1 ? "" : "s", \
greatest_info.suite.passed, \
greatest_info.suite.failed, \
greatest_info.suite.skipped); \
GREATEST_CLOCK_DIFF(greatest_info.suite.pre_suite, \
greatest_info.suite.post_suite); \
fprintf(GREATEST_STDOUT, "\n"); \
} \
} \
\
static void update_counts_and_reset_suite(void) { \
greatest_info.setup = NULL; \
greatest_info.setup_udata = NULL; \
greatest_info.teardown = NULL; \
greatest_info.teardown_udata = NULL; \
greatest_info.passed += greatest_info.suite.passed; \
greatest_info.failed += greatest_info.suite.failed; \
greatest_info.skipped += greatest_info.suite.skipped; \
greatest_info.tests_run += greatest_info.suite.tests_run; \
memset(&greatest_info.suite, 0, sizeof(greatest_info.suite)); \
greatest_info.col = 0; \
} \
\
static void greatest_run_suite(greatest_suite_cb *suite_cb, \
const char *suite_name) { \
if (greatest_info.suite_filter && \
!greatest_name_match(suite_name, greatest_info.suite_filter)) { \
return; \
} \
if (GREATEST_FIRST_FAIL() && greatest_info.failed > 0) { return; } \
if (greatest_info.suite.tests_run > 0) { \
update_counts_and_reset_suite(); \
} \
fprintf(GREATEST_STDOUT, "\n* Suite %s:\n", suite_name); \
GREATEST_SET_TIME(greatest_info.suite.pre_suite); \
suite_cb(); \
GREATEST_SET_TIME(greatest_info.suite.post_suite); \
report_suite(); \
} \
\
void greatest_do_pass(const char *name) { \
if (GREATEST_IS_VERBOSE()) { \
fprintf(GREATEST_STDOUT, "PASS %s: %s", \
name, greatest_info.msg ? greatest_info.msg : ""); \
} else { \
fprintf(GREATEST_STDOUT, "."); \
} \
greatest_info.suite.passed++; \
} \
\
void greatest_do_fail(const char *name) { \
if (GREATEST_IS_VERBOSE()) { \
fprintf(GREATEST_STDOUT, \
"FAIL %s: %s (%s:%u)", \
name, greatest_info.msg ? greatest_info.msg : "", \
greatest_info.fail_file, greatest_info.fail_line); \
} else { \
fprintf(GREATEST_STDOUT, "F"); \
greatest_info.col++; \
\
if (greatest_info.col != 0) { \
fprintf(GREATEST_STDOUT, "\n"); \
greatest_info.col = 0; \
} \
fprintf(GREATEST_STDOUT, "FAIL %s: %s (%s:%u)\n", \
name, \
greatest_info.msg ? greatest_info.msg : "", \
greatest_info.fail_file, greatest_info.fail_line); \
} \
greatest_info.suite.failed++; \
} \
\
void greatest_do_skip(const char *name) { \
if (GREATEST_IS_VERBOSE()) { \
fprintf(GREATEST_STDOUT, "SKIP %s: %s", \
name, \
greatest_info.msg ? \
greatest_info.msg : "" ); \
} else { \
fprintf(GREATEST_STDOUT, "s"); \
} \
greatest_info.suite.skipped++; \
} \
\
int greatest_do_assert_equal_t(const void *exp, const void *got, \
greatest_type_info *type_info, void *udata) { \
int eq = 0; \
if (type_info == NULL || type_info->equal == NULL) { \
return 0; \
} \
eq = type_info->equal(exp, got, udata); \
if (!eq) { \
if (type_info->print != NULL) { \
fprintf(GREATEST_STDOUT, "\nExpected: "); \
(void)type_info->print(exp, udata); \
fprintf(GREATEST_STDOUT, "\nGot: "); \
(void)type_info->print(got, udata); \
fprintf(GREATEST_STDOUT, "\n"); \
} else { \
fprintf(GREATEST_STDOUT, \
"GREATEST_ASSERT_EQUAL_T failure at %s:%u\n", \
greatest_info.fail_file, \
greatest_info.fail_line); \
} \
} \
return eq; \
} \
\
void greatest_usage(const char *name) { \
fprintf(GREATEST_STDOUT, \
"Usage: %s [-hlfv] [-s SUITE] [-t TEST]\n" \
" -h print this Help\n" \
" -l List suites and their tests, then exit\n" \
" -f Stop runner after first failure\n" \
" -v Verbose output\n" \
" -s SUITE only run suites containing string SUITE\n" \
" -t TEST only run tests containing string TEST\n", \
name); \
} \
\
static void greatest_parse_args(int argc, char **argv) { \
int i = 0; \
for (i = 1; i < argc; i++) { \
if (0 == strncmp("-t", argv[i], 2)) { \
if (argc <= i + 1) { \
greatest_usage(argv[0]); \
exit(EXIT_FAILURE); \
} \
greatest_info.test_filter = argv[i+1]; \
i++; \
} else if (0 == strncmp("-s", argv[i], 2)) { \
if (argc <= i + 1) { \
greatest_usage(argv[0]); \
exit(EXIT_FAILURE); \
} \
greatest_info.suite_filter = argv[i+1]; \
i++; \
} else if (0 == strncmp("-f", argv[i], 2)) { \
greatest_info.flags |= GREATEST_FLAG_FIRST_FAIL; \
} else if (0 == strncmp("-v", argv[i], 2)) { \
greatest_info.verbosity++; \
} else if (0 == strncmp("-l", argv[i], 2)) { \
greatest_info.flags |= GREATEST_FLAG_LIST_ONLY; \
} else if (0 == strncmp("-h", argv[i], 2)) { \
greatest_usage(argv[0]); \
exit(EXIT_SUCCESS); \
} else if (0 == strncmp("--", argv[i], 2)) { \
break; \
} else { \
fprintf(GREATEST_STDOUT, \
"Unknown argument '%s'\n", argv[i]); \
greatest_usage(argv[0]); \
exit(EXIT_FAILURE); \
} \
} \
} \
\
int greatest_all_passed(void) { return (greatest_info.failed == 0); } \
\
void greatest_set_test_filter(const char *name) { \
greatest_info.test_filter = name; \
} \
\
void greatest_set_suite_filter(const char *name) { \
greatest_info.suite_filter = name; \
} \
\
void greatest_get_report(struct greatest_report_t *report) { \
if (report) { \
report->passed = greatest_info.passed; \
report->failed = greatest_info.failed; \
report->skipped = greatest_info.skipped; \
report->assertions = greatest_info.assertions; \
} \
} \
\
unsigned int greatest_get_verbosity(void) { \
return greatest_info.verbosity; \
} \
\
void greatest_set_verbosity(unsigned int verbosity) { \
greatest_info.verbosity = (unsigned char)verbosity; \
} \
\
void greatest_set_flag(greatest_flag_t flag) { \
greatest_info.flags |= flag; \
} \
\
void GREATEST_SET_SETUP_CB(greatest_setup_cb *cb, void *udata) { \
greatest_info.setup = cb; \
greatest_info.setup_udata = udata; \
} \
\
void GREATEST_SET_TEARDOWN_CB(greatest_teardown_cb *cb, \
void *udata) { \
greatest_info.teardown = cb; \
greatest_info.teardown_udata = udata; \
} \
\
static int greatest_string_equal_cb(const void *exp, const void *got, \
void *udata) { \
(void)udata; \
return (0 == strcmp((const char *)exp, (const char *)got)); \
} \
\
static int greatest_string_printf_cb(const void *t, void *udata) { \
(void)udata; \
return fprintf(GREATEST_STDOUT, "%s", (const char *)t); \
} \
\
greatest_type_info greatest_type_info_string = { \
greatest_string_equal_cb, \
greatest_string_printf_cb, \
}; \
\
greatest_run_info greatest_info
#define GREATEST_INIT() \
do { \
\
(void)greatest_run_suite; \
(void)greatest_parse_args; \
\
memset(&greatest_info, 0, sizeof(greatest_info)); \
greatest_info.width = GREATEST_DEFAULT_WIDTH; \
GREATEST_SET_TIME(greatest_info.begin); \
} while (0) \
#define GREATEST_MAIN_BEGIN() \
do { \
GREATEST_INIT(); \
greatest_parse_args(argc, argv); \
} while (0)
#define GREATEST_PRINT_REPORT() \
do { \
if (!GREATEST_LIST_ONLY()) { \
update_counts_and_reset_suite(); \
GREATEST_SET_TIME(greatest_info.end); \
fprintf(GREATEST_STDOUT, \
"\nTotal: %u test%s", \
greatest_info.tests_run, \
greatest_info.tests_run == 1 ? "" : "s"); \
GREATEST_CLOCK_DIFF(greatest_info.begin, \
greatest_info.end); \
fprintf(GREATEST_STDOUT, ", %u assertion%s\n", \
greatest_info.assertions, \
greatest_info.assertions == 1 ? "" : "s"); \
fprintf(GREATEST_STDOUT, \
"Pass: %u, fail: %u, skip: %u.\n", \
greatest_info.passed, \
greatest_info.failed, greatest_info.skipped); \
} \
} while (0)
#define GREATEST_MAIN_END() \
do { \
GREATEST_PRINT_REPORT(); \
return (greatest_all_passed() ? EXIT_SUCCESS : EXIT_FAILURE); \
} while (0)
#if GREATEST_USE_ABBREVS
#define TEST GREATEST_TEST
#define SUITE GREATEST_SUITE
#define SUITE_EXTERN GREATEST_SUITE_EXTERN
#define RUN_TEST GREATEST_RUN_TEST
#define RUN_TEST1 GREATEST_RUN_TEST1
#define RUN_SUITE GREATEST_RUN_SUITE
#define ASSERT GREATEST_ASSERT
#define ASSERTm GREATEST_ASSERTm
#define ASSERT_FALSE GREATEST_ASSERT_FALSE
#define ASSERT_EQ GREATEST_ASSERT_EQ
#define ASSERT_EQ_FMT GREATEST_ASSERT_EQ_FMT
#define ASSERT_IN_RANGE GREATEST_ASSERT_IN_RANGE
#define ASSERT_EQUAL_T GREATEST_ASSERT_EQUAL_T
#define ASSERT_STR_EQ GREATEST_ASSERT_STR_EQ
#define ASSERT_FALSEm GREATEST_ASSERT_FALSEm
#define ASSERT_EQm GREATEST_ASSERT_EQm
#define ASSERT_EQ_FMTm GREATEST_ASSERT_EQ_FMTm
#define ASSERT_IN_RANGEm GREATEST_ASSERT_IN_RANGEm
#define ASSERT_EQUAL_Tm GREATEST_ASSERT_EQUAL_Tm
#define ASSERT_STR_EQm GREATEST_ASSERT_STR_EQm
#define PASS GREATEST_PASS
#define FAIL GREATEST_FAIL
#define SKIP GREATEST_SKIP
#define PASSm GREATEST_PASSm
#define FAILm GREATEST_FAILm
#define SKIPm GREATEST_SKIPm
#define SET_SETUP GREATEST_SET_SETUP_CB
#define SET_TEARDOWN GREATEST_SET_TEARDOWN_CB
#define CHECK_CALL GREATEST_CHECK_CALL
#ifdef GREATEST_VA_ARGS
#define RUN_TESTp GREATEST_RUN_TESTp
#endif
#if GREATEST_USE_LONGJMP
#define ASSERT_OR_LONGJMP GREATEST_ASSERT_OR_LONGJMP
#define ASSERT_OR_LONGJMPm GREATEST_ASSERT_OR_LONGJMPm
#define FAIL_WITH_LONGJMP GREATEST_FAIL_WITH_LONGJMP
#define FAIL_WITH_LONGJMPm GREATEST_FAIL_WITH_LONGJMPm
#endif
#endif
#endif