From 85ff79a58f531a5173565bbe1b97b5a9c7e4148e Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Tue, 19 May 2009 04:34:59 +0200 Subject: Starting to verify the properties --- tests/test-glib-properties-client.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/test-glib-properties-client.c') diff --git a/tests/test-glib-properties-client.c b/tests/test-glib-properties-client.c index d840217..145e4fd 100644 --- a/tests/test-glib-properties-client.c +++ b/tests/test-glib-properties-client.c @@ -38,6 +38,19 @@ verify_props (DbusmenuMenuitem * mi, gchar ** properties) return TRUE; } + /* Verify they're all there and correct */ + guint i; + for (i = 0; properties[i] != NULL; i += 2) { + const gchar * value = dbusmenu_menuitem_property_get(mi, properties[i]); + if (g_strcmp0(value, properties[i + 1])) { + g_debug("\tFailed as property '%s' should be '%s' and is '%s'", properties[i], properties[i+1], value); + return FALSE; + } + } + + /* Verify that we don't have any extras */ + // GList * props = dbusmenu_menuitem_properties_list(mi); + return TRUE; } -- cgit v1.2.3