15042
|
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 */
|
15092
|
9 Suite * cipher_suite(void);
|
|
10 Suite * jabber_jutil_suite(void);
|
15042
|
11 Suite * util_suite(void);
|
|
12
|
|
13 /* helper macros */
|
|
14 #define assert_string_equal(expected, actual) { \
|
|
15 const gchar *a = actual; \
|
|
16 fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \
|
|
17 }
|
|
18
|
|
19 #define assert_string_equal_free(expected, actual) { \
|
15045
|
20 gchar *b = actual; \
|
|
21 assert_string_equal(expected, b); \
|
|
22 g_free(b); \
|
15042
|
23 }
|
|
24
|
|
25
|
|
26 #endif /* ifndef TESTS_H */
|
|
27
|