aboutsummaryrefslogtreecommitdiff
path: root/tests/test-libcustomindicator-dbus-client.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-10-22 14:30:40 -0500
committerTed Gould <ted@canonical.com>2009-10-22 14:30:40 -0500
commitb04e0deb68b1e245eba4bcbbf80b8d706d0250b8 (patch)
treea5aff63d1891031cc06c6e0ffcf9b0c109aeb261 /tests/test-libcustomindicator-dbus-client.c
parentaf102359a5d71fa5ddfad14d3e6d3063c1801578 (diff)
downloadlibayatana-appindicator-b04e0deb68b1e245eba4bcbbf80b8d706d0250b8.tar.gz
libayatana-appindicator-b04e0deb68b1e245eba4bcbbf80b8d706d0250b8.tar.bz2
libayatana-appindicator-b04e0deb68b1e245eba4bcbbf80b8d706d0250b8.zip
Checking the category and state
Diffstat (limited to 'tests/test-libcustomindicator-dbus-client.c')
-rw-r--r--tests/test-libcustomindicator-dbus-client.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/test-libcustomindicator-dbus-client.c b/tests/test-libcustomindicator-dbus-client.c
index 66922dc..bdc0fa6 100644
--- a/tests/test-libcustomindicator-dbus-client.c
+++ b/tests/test-libcustomindicator-dbus-client.c
@@ -50,6 +50,24 @@ prop_category_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data)
{
propcount++;
+ GError * error = NULL;
+ GValue value = {0};
+
+ if (!dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
+ g_warning("Getting category failed: %s", error->message);
+ g_error_free(error);
+ passed = FALSE;
+ check_propcount();
+ return;
+ }
+
+ if (g_strcmp0(TEST_CATEGORY_S, g_value_get_string(&value))) {
+ g_debug("Property category Returned: FAILED");
+ passed = FALSE;
+ } else {
+ g_debug("Property category Returned: PASSED");
+ }
+
check_propcount();
return;
}
@@ -59,6 +77,24 @@ prop_status_cb (DBusGProxy * proxy, DBusGProxyCall * call, void * data)
{
propcount++;
+ GError * error = NULL;
+ GValue value = {0};
+
+ if (!dbus_g_proxy_end_call(proxy, call, &error, G_TYPE_VALUE, &value, G_TYPE_INVALID)) {
+ g_warning("Getting status failed: %s", error->message);
+ g_error_free(error);
+ passed = FALSE;
+ check_propcount();
+ return;
+ }
+
+ if (g_strcmp0(TEST_STATE_S, g_value_get_string(&value))) {
+ g_debug("Property status Returned: FAILED");
+ passed = FALSE;
+ } else {
+ g_debug("Property status Returned: PASSED");
+ }
+
check_propcount();
return;
}