Mercurial > pidgin
view libpurple/tests/tests.h @ 25605:9c0337d4b878
Fix the crash/leaks in statusbox
*** Plucked rev 0cb6e54b (darkrain42@pidgin.im):
Look up the old image before we store the new one in the hash table.
Looking up the new image and then unref:ing it (hence freeing the data
and subsequently returning it) is not good. This was causing problems
with changing buddy icons while using mystatusbox. Refs #9120.
*** Plucked rev d25c9ed7 (darkrain42@pidgin.im):
Don't leak image refs in gtkstatusbox and assertion failure in nullprpl
purple_imgstore_new_from_file gives us a ref and
pidgin_status_box_set_buddy_icon also takes a ref.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 06 May 2009 18:58:47 +0000 |
parents | fb73a6ed8197 |
children | 42359a734696 |
line wrap: on
line source
#ifndef TESTS_H # define TESTS_H #include "../purple.h" #include <check.h> /* define the test suites here */ /* remember to add the suite to the runner in check_libpurple.c */ Suite * master_suite(void); Suite * cipher_suite(void); Suite * jabber_jutil_suite(void); Suite * util_suite(void); /* helper macros */ #define assert_string_equal(expected, actual) { \ const gchar *a = actual; \ fail_unless(strcmp(expected, a) == 0, "Expecting '%s' but got '%s'", expected, a); \ } #define assert_string_equal_free(expected, actual) { \ gchar *b = actual; \ assert_string_equal(expected, b); \ g_free(b); \ } #endif /* ifndef TESTS_H */