[glib] Improve test coverage for GPropertyAction
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Improve test coverage for GPropertyAction
- Date: Sat, 21 Dec 2013 18:22:30 +0000 (UTC)
commit 5ab9e21d7a595ccc00bef861e57740f0ec2bc14e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Dec 21 01:10:59 2013 -0500
Improve test coverage for GPropertyAction
gio/tests/actions.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/actions.c b/gio/tests/actions.c
index 2750a2d..b33ff84 100644
--- a/gio/tests/actions.c
+++ b/gio/tests/actions.c
@@ -990,6 +990,10 @@ test_property_actions (void)
GPropertyAction *action;
GSocketClient *client;
GApplication *app;
+ gchar *name;
+ GVariantType *ptype, *stype;
+ gboolean enabled;
+ GVariant *state;
group = g_simple_action_group_new ();
g_signal_connect (group, "action-state-changed", G_CALLBACK (state_changed), NULL);
@@ -1004,6 +1008,12 @@ test_property_actions (void)
/* uint... */
action = g_property_action_new ("keepalive", app, "inactivity-timeout");
+ g_object_get (action, "name", &name, "parameter-type", &ptype, "enabled", &enabled, "state-type", &stype,
"state", &state, NULL);
+ g_assert_cmpstr (name, ==, "keepalive");
+ g_assert (enabled);
+ g_free (name);
+ g_variant_unref (state);
+
g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action));
g_object_unref (action);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]