diff options
author | Ted Gould <ted@gould.cx> | 2011-01-05 20:49:47 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-01-05 20:49:47 -0600 |
commit | 0c50ae11cafdd7ca04ae6d2a69390903d16daedd (patch) | |
tree | 957fbc0275b46b1ef0be6ad2730280db34a11e17 /tests | |
parent | e5f53f91d929c46914b4a02336e31724fb54ec95 (diff) | |
download | libdbusmenu-0c50ae11cafdd7ca04ae6d2a69390903d16daedd.tar.gz libdbusmenu-0c50ae11cafdd7ca04ae6d2a69390903d16daedd.tar.bz2 libdbusmenu-0c50ae11cafdd7ca04ae6d2a69390903d16daedd.zip |
Adding a test for removal by string being NULL
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-glib-objects.c | 8 |
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; |