| |
1 #ifndef TESTS_H |
| |
2 # define TESTS_H |
| |
3 |
| |
4 #include <glib.h> |
| |
5 #include <check.h> |
| |
6 |
| |
7 /* define the test suites here */ |
| |
8 /* remember to add the suite to the runner in check_libgaim.c */ |
| |
9 Suite * util_suite(void); |
| |
10 |
| |
11 /* helper macros */ |
| |
12 #define assert_string_equal(expected, actual) { \ |
| |
13 const gchar *a = actual; \ |
| |
14 fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \ |
| |
15 } |
| |
16 |
| |
17 #define assert_string_equal_free(expected, actual) { \ |
| |
18 gchar *a = actual; \ |
| |
19 assert_string_equal(expected, a); \ |
| |
20 g_free(a); \ |
| |
21 } |
| |
22 |
| |
23 |
| |
24 #endif /* ifndef TESTS_H */ |
| |
25 |