aboutsummaryrefslogtreecommitdiff
path: root/tests/test-glib-objects.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-18 08:59:50 -0600
committerTed Gould <ted@gould.cx>2010-11-18 08:59:50 -0600
commitcd8988a8dfd03a585860eabfc97c0e0aa8c6e912 (patch)
treea015bad4251cfcaaf670eb24cf89d77bcb1eab34 /tests/test-glib-objects.c
parentaabdcffea6b311cda25ad2937466d65fc4e36381 (diff)
downloadlibdbusmenu-cd8988a8dfd03a585860eabfc97c0e0aa8c6e912.tar.gz
libdbusmenu-cd8988a8dfd03a585860eabfc97c0e0aa8c6e912.tar.bz2
libdbusmenu-cd8988a8dfd03a585860eabfc97c0e0aa8c6e912.zip
Switching to variants in the property changed signals
Diffstat (limited to 'tests/test-glib-objects.c')
-rw-r--r--tests/test-glib-objects.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-glib-objects.c b/tests/test-glib-objects.c
index c6a8dc9..6afbe57 100644
--- a/tests/test-glib-objects.c
+++ b/tests/test-glib-objects.c
@@ -177,7 +177,7 @@ test_object_menuitem_props_swap (void)
/* A helper to put a value into a pointer for eval. */
static void
-test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GValue * value, GValue ** out)
+test_object_menuitem_props_signals_helper (DbusmenuMenuitem * mi, gchar * property, GVariant * value, GVariant ** out)
{
if (!g_strcmp0(property, "swapper")) {
*out = value;
@@ -194,7 +194,7 @@ test_object_menuitem_props_signals (void)
{
/* Build a menu item */
DbusmenuMenuitem * item = dbusmenu_menuitem_new();
- GValue * out = NULL;
+ GVariant * out = NULL;
/* Test to make sure it's a happy object */
g_assert(item != NULL);
@@ -205,25 +205,25 @@ test_object_menuitem_props_signals (void)
/* Setting a boolean */
dbusmenu_menuitem_property_set_bool(item, "swapper", TRUE);
g_assert(out != NULL);
- g_assert(g_value_get_boolean(out));
+ g_assert(g_variant_get_boolean(out));
out = NULL;
/* Setting a int */
dbusmenu_menuitem_property_set_int(item, "swapper", 5432);
g_assert(out != NULL);
- g_assert(g_value_get_int(out) == 5432);
+ g_assert(g_variant_get_int32(out) == 5432);
out = NULL;
/* Setting a string */
dbusmenu_menuitem_property_set(item, "swapper", "mystring");
g_assert(out != NULL);
- g_assert(!g_strcmp0(g_value_get_string(out), "mystring"));
+ g_assert(!g_strcmp0(g_variant_get_string(out, NULL), "mystring"));
out = NULL;
/* Setting a boolean */
dbusmenu_menuitem_property_set_bool(item, "swapper", FALSE);
g_assert(out != NULL);
- g_assert(!g_value_get_boolean(out));
+ g_assert(!g_variant_get_boolean(out));
out = NULL;
g_object_unref(item);