From 0c50ae11cafdd7ca04ae6d2a69390903d16daedd Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 5 Jan 2011 20:49:47 -0600 Subject: Adding a test for removal by string being NULL --- tests/test-glib-objects.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/test-glib-objects.c') diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c index 2c8eda9..9c99280 100644 --- a/tests/test-glib-objects.c +++ b/tests/test-glib-objects.c @@ -292,6 +292,14 @@ test_object_menuitem_props_removal (void) dbusmenu_menuitem_property_set_variant(item, "myprop", NULL); g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + /* Set the property again */ + dbusmenu_menuitem_property_set_variant(item, "myprop", g_variant_new_int32(34)); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") != NULL); + + /* Remove the property with a NULL string */ + dbusmenu_menuitem_property_set(item, "myprop", NULL); + g_assert(dbusmenu_menuitem_property_get_variant(item, "myprop") == NULL); + g_object_unref(item); return; -- cgit v1.2.3