/* [<][>][^][v][top][bottom][index][help] */
1 #ifndef TESTUTILS_H
2 #define TESTUTILS_H
3
4 #define SUCCESS (0)
5
6 #define TEST_EQUAL(a, b, s) \
7 test_equal(a, b, s, __FILE__, __FUNCTION__, __LINE__)
8
9 #define TEST_EQUAL_ONE_OF(a, b, c, s) \
10 test_equal_one_of(a, b, c, s, __FILE__, __FUNCTION__, __LINE__)
11
12 #define TEST_NOT_EQUAL(a, b, s) \
13 test_not_equal(a, b, s, __FILE__, __FUNCTION__, __LINE__)
14
15 #define TEST_NEGATIVE(a, s) \
16 test_negative(a, s, __FILE__, __FUNCTION__, __LINE__)
17
18 #define TEST_POSITIVE(a, s) \
19 test_positive(a, s, __FILE__, __FUNCTION__, __LINE__)
20
21 #define TEST_STATS() \
22 test_print_stats( __FILE__, __FUNCTION__, __LINE__)
23
24 #define TEST_VERBOSE_ON() \
25 test_verbose_on()
26
27 #define TEST_VERBOSE_OFF() \
28 test_verbose_off()
29
30 void test_equal(int ret_val, int expected_val, const char *str,
31 const char *file, const char* func, int line);
32 void test_equal_one_of(int val, int expected_val1, int expected_val2, const char *str,
33 const char *file, const char *func, int line);
34 void test_positive(int ret_val, const char *str,
35 const char *file, const char* func, int line);
36 void test_negative(int ret_val, const char *str,
37 const char *file, const char* func, int line);
38 void test_not_equal(int ret_val, int expected_val, const char *str,
39 const char *file, const char* func, int line);
40 void test_print_stats(const char *file, const char* func, int line);
41 void test_reset_stats(void);
42 void test_verbose_on(void);
43 void test_verbose_off(void);
44
45 #endif /* TESTUTILS_H */