annotate libgaim/tests/tests.h @ 15136:af9fde10e4e2

[gaim-migrate @ 17922] small leak committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Fri, 08 Dec 2006 02:57:50 +0000
parents 4ba77924fc08
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15042
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 */
15092
4ba77924fc08 [gaim-migrate @ 17878]
Nathan Walp <nwalp@pidgin.im>
parents: 15045
diff changeset
9 Suite * cipher_suite(void);
4ba77924fc08 [gaim-migrate @ 17878]
Nathan Walp <nwalp@pidgin.im>
parents: 15045
diff changeset
10 Suite * jabber_jutil_suite(void);
15042
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
11 Suite * util_suite(void);
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
12
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 /* helper macros */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14 #define assert_string_equal(expected, actual) { \
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 const gchar *a = actual; \
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 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
17 }
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19 #define assert_string_equal_free(expected, actual) { \
15045
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15043
diff changeset
20 gchar *b = actual; \
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15043
diff changeset
21 assert_string_equal(expected, b); \
d7fccb8cb8a8 [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15043
diff changeset
22 g_free(b); \
15042
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
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26 #endif /* ifndef TESTS_H */
edd78a0c6698 [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
27