64 typedef void (*test_func)(abts_case *tc,
void *data);
66 #define ADD_SUITE(suite) abts_add_suite(suite, __FILE__); 68 abts_suite *abts_add_suite(abts_suite *suite,
const char *suite_name);
69 void abts_run_test(abts_suite *ts, test_func f,
void *value);
70 void abts_log_message(
const char *fmt, ...);
72 void abts_int_equal(abts_case *tc,
const int expected,
const int actual,
int lineno);
73 void abts_int_nequal(abts_case *tc,
const int expected,
const int actual,
int lineno);
74 void abts_str_equal(abts_case *tc,
const char *expected,
const char *actual,
int lineno);
75 void abts_str_nequal(abts_case *tc,
const char *expected,
const char *actual,
76 size_t n,
int lineno);
77 void abts_ptr_notnull(abts_case *tc,
const void *ptr,
int lineno);
78 void abts_ptr_equal(abts_case *tc,
const void *expected,
const void *actual,
int lineno);
79 void abts_true(abts_case *tc,
int condition,
int lineno);
80 void abts_fail(abts_case *tc,
const char *message,
int lineno);
81 void abts_not_impl(abts_case *tc,
const char *message,
int lineno);
82 void abts_assert(abts_case *tc,
const char *message,
int condition,
int lineno);
85 #define ABTS_INT_EQUAL(a, b, c) abts_int_equal(a, b, c, __LINE__) 86 #define ABTS_INT_NEQUAL(a, b, c) abts_int_nequal(a, b, c, __LINE__) 87 #define ABTS_STR_EQUAL(a, b, c) abts_str_equal(a, b, c, __LINE__) 88 #define ABTS_STR_NEQUAL(a, b, c, d) abts_str_nequal(a, b, c, d, __LINE__) 89 #define ABTS_PTR_NOTNULL(a, b) abts_ptr_notnull(a, b, __LINE__) 90 #define ABTS_PTR_EQUAL(a, b, c) abts_ptr_equal(a, b, c, __LINE__) 91 #define ABTS_TRUE(a, b) abts_true(a, b, __LINE__); 92 #define ABTS_FAIL(a, b) abts_fail(a, b, __LINE__); 93 #define ABTS_NOT_IMPL(a, b) abts_not_impl(a, b, __LINE__); 94 #define ABTS_ASSERT(a, b, c) abts_assert(a, b, c, __LINE__);