libpurple/tests/tests.h

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 21919
9be7eb0e891c
child 28013
cb4d0ca2e550
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

15104
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
1 #ifndef TESTS_H
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
2 # define TESTS_H
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
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
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
6 #include <check.h>
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
7
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
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
40b03e555de9 [gaim-migrate @ 17878]
Nathan Walp <nwalp@pidgin.im>
parents: 15107
diff changeset
11 Suite * cipher_suite(void);
40b03e555de9 [gaim-migrate @ 17878]
Nathan Walp <nwalp@pidgin.im>
parents: 15107
diff changeset
12 Suite * jabber_jutil_suite(void);
15104
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
13 Suite * util_suite(void);
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
14
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
15 /* helper macros */
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
16 #define assert_string_equal(expected, actual) { \
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
17 const gchar *a = actual; \
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
18 fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
19 }
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
20
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
21 #define assert_string_equal_free(expected, actual) { \
15107
9873435e156d [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15105
diff changeset
22 gchar *b = actual; \
9873435e156d [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15105
diff changeset
23 assert_string_equal(expected, b); \
9873435e156d [gaim-migrate @ 17829]
Nathan Walp <nwalp@pidgin.im>
parents: 15105
diff changeset
24 g_free(b); \
15104
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
25 }
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
26
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
27
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
28 #endif /* ifndef TESTS_H */
d71bd6517e5e [gaim-migrate @ 17825]
Nathan Walp <nwalp@pidgin.im>
parents:
diff changeset
29

mercurial