Fix crashes when filenames end up being NULL in some prpls.
[pidgin-git.git] / libpurple / tests / tests.h
blobdfd292ce6e50c31f4a523a9b92e885c47da2563c
1 #ifndef TESTS_H
2 # define TESTS_H
4 #include "../purple.h"
6 #include <check.h>
8 /* define the test suites here */
9 /* remember to add the suite to the runner in check_libpurple.c */
10 Suite * master_suite(void);
11 Suite * cipher_suite(void);
12 Suite * jabber_jutil_suite(void);
13 Suite * util_suite(void);
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); \
21 #define assert_string_equal_free(expected, actual) { \
22 gchar *b = actual; \
23 assert_string_equal(expected, b); \
24 g_free(b); \
28 #endif /* ifndef TESTS_H */