annotate libgaim/tests/tests.h @ 15076:2c93b0620065

[gaim-migrate @ 17859] Fix win32 build for buddy icon changes. Also a couple leak fixes. There really isn't that much actually changed, but also I did some whitespace cleanup at the same time. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 30 Nov 2006 17:45:28 +0000
parents d7fccb8cb8a8
children 4ba77924fc08
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15043
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
1 #ifndef TESTS_H
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
2 # define TESTS_H
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
3
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
4 #include <glib.h>
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
5 #include <check.h>
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
6
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
7 /* define the test suites here */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
8 /* remember to add the suite to the runner in check_libgaim.c */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
9 Suite * util_suite(void);
15044
603960420450 [gaim-migrate @ 17827]
Gary Kramlich <grim@reaperworld.com>
parents: 15043
diff changeset
10 Suite * cipher_suite(void);
15043
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
12 /* helper macros */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 #define assert_string_equal(expected, actual) { \
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 const gchar *a = actual; \
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 }
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 #define assert_string_equal_free(expected, actual) { \
15046
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15044
diff changeset
19 gchar *b = actual; \
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15044
diff changeset
20 assert_string_equal(expected, b); \
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15044
diff changeset
21 g_free(b); \
15043
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
22 }
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
23
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
24
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
25 #endif /* ifndef TESTS_H */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26