libpurple/tests/test_person.c

changeset 41761
9dc5d28fca99
parent 41749
c22448f50d5d
child 41771
c5877e2c93f2
--- a/libpurple/tests/test_person.c	Thu Sep 29 06:30:35 2022 -0500
+++ b/libpurple/tests/test_person.c	Thu Sep 29 21:44:01 2022 -0500
@@ -112,6 +112,7 @@
 	PurpleAccount *account = NULL;
 	PurpleContact *contact = NULL;
 	PurplePerson *person = NULL;
+	PurplePerson *person1 = NULL;
 	guint n_items = 0;
 	gboolean removed = FALSE;
 	gboolean changed = FALSE;
@@ -129,6 +130,9 @@
 	g_assert_cmpuint(n_items, ==, 1);
 	g_assert_true(changed);
 
+	person1 = purple_contact_get_person(contact);
+	g_assert_true(person1 == person);
+
 	changed = FALSE;
 
 	removed = purple_person_remove_contact(person, contact);
@@ -137,8 +141,12 @@
 	g_assert_cmpuint(n_items, ==, 0);
 	g_assert_true(changed);
 
+	person1 = purple_contact_get_person(contact);
+	g_assert_null(person1);
+
 	g_clear_object(&person);
 	g_clear_object(&account);
+	g_clear_object(&contact);
 }
 
 static void

mercurial