Wed, 30 Jul 2008 03:58:21 +0000
Cleanup unnecessary casts and etc.
| 15104 | 1 | #ifndef TESTS_H |
| 2 | # define TESTS_H | |
| 3 | ||
|
21919
9be7eb0e891c
A couple compile fixes to the tests from Elliott Sales de Andrade. Fixes #4313.
Daniel Atallah <datallah@pidgin.im>
parents:
15950
diff
changeset
|
4 | #include "../purple.h" |
|
9be7eb0e891c
A couple compile fixes to the tests from Elliott Sales de Andrade. Fixes #4313.
Daniel Atallah <datallah@pidgin.im>
parents:
15950
diff
changeset
|
5 | |
| 15104 | 6 | #include <check.h> |
| 7 | ||
| 8 | /* define the test suites here */ | |
|
15867
27d45557637d
libpurplify the 'make check' tests so they work again
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15435
diff
changeset
|
9 | /* remember to add the suite to the runner in check_libpurple.c */ |
|
15950
0f01bb61c5d3
Fix compiler warnings and errors in tests resulting from using DEBUG_CFLAGS
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15867
diff
changeset
|
10 | Suite * master_suite(void); |
| 15154 | 11 | Suite * cipher_suite(void); |
| 12 | Suite * jabber_jutil_suite(void); | |
| 15104 | 13 | Suite * util_suite(void); |
| 14 | ||
| 15 | /* helper macros */ | |
| 16 | #define assert_string_equal(expected, actual) { \ | |
| 17 | const gchar *a = actual; \ | |
| 18 | fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \ | |
| 19 | } | |
| 20 | ||
| 21 | #define assert_string_equal_free(expected, actual) { \ | |
| 15107 | 22 | gchar *b = actual; \ |
| 23 | assert_string_equal(expected, b); \ | |
| 24 | g_free(b); \ | |
| 15104 | 25 | } |
| 26 | ||
| 27 | ||
| 28 | #endif /* ifndef TESTS_H */ | |
| 29 |