aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-objects.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-01-05 20:50:10 -0600
committerTed Gould <ted@gould.cx>2011-01-05 20:50:10 -0600
commita923b741cf78bd84534900eca2adf0c32bcb5f0f (patch)
tree706aafd6827bfe963443334d6e94304760c8f912 /tests/test-glib-objects.c
parentd18000e0ab2880798650dc5c2502a5c7f75fc2a7 (diff)
parent0c50ae11cafdd7ca04ae6d2a69390903d16daedd (diff)
downloadlibdbusmenu-a923b741cf78bd84534900eca2adf0c32bcb5f0f.tar.gz
libdbusmenu-a923b741cf78bd84534900eca2adf0c32bcb5f0f.tar.bz2
libdbusmenu-a923b741cf78bd84534900eca2adf0c32bcb5f0f.zip
A new case where the string is NULL
Diffstat (limited to 'tests/test-glib-objects.c')
-rw-r--r--tests/test-glib-objects.c8
1 files changed, 8 insertions, 0 deletions
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;