-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_utils.h
More file actions
24 lines (22 loc) · 922 Bytes
/
Copy pathtest_utils.h
File metadata and controls
24 lines (22 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef INCLUDE_test_utils_h__
#define INCLUDE_test_utils_h__
#define TEST_PASS 1
#define TEST_FAIL 0
extern const char *red, *green, *yellow, *cyan, *reset;
extern unsigned int passed, failed, t_verbose;
extern void t_set_colors(int force);
extern void t_start(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void t_pass(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void t_fail(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern void t_diag(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2)));
extern int ok_int(int a, int b, const char *name);
extern int ok_uint(unsigned int a, unsigned int b, const char *name);
extern int ok_str(const char *a, const char *b, const char *name);
extern int t_end(void);
extern void crash(const char *fmt, ...)
__attribute__((__format__(__printf__, 1, 2), __noreturn__));
#endif