26 #ifndef TINYTEST_H_INCLUDED_
27 #define TINYTEST_H_INCLUDED_
30 #define TT_FORK (1<<0)
32 #define TT_SKIP (1<<1)
34 #define TT_ENABLED_ (1<<2)
36 #define TT_OFF_BY_DEFAULT (1<<3)
38 #define TT_FIRST_USER_FLAG (1<<4)
40 typedef void (*testcase_fn)(
void *);
60 #define END_OF_TESTCASES { NULL, NULL, 0, NULL, NULL }
67 #define END_OF_GROUPS { NULL, NULL}
73 #define END_OF_ALIASES { NULL, NULL }
76 int tinytest_cur_test_has_failed(
void);
79 void tinytest_set_test_failed_(
void);
81 void tinytest_set_test_skipped_(
void);
83 int tinytest_get_verbosity_(
void);
86 int tinytest_set_flag_(
struct testgroup_t *,
const char *,
int set,
unsigned long);
88 char *tinytest_format_hex_(
const void *,
unsigned long);
91 #define tinytest_skip(groups, named) \
92 tinytest_set_flag_(groups, named, 1, TT_SKIP)
101 int tinytest_main(
int argc,
const char **argv,
struct testgroup_t *groups);
int(* cleanup_fn)(const struct testcase_t *, void *)
const struct testcase_setup_t * setup