[next] telepathy-glib: test tp_handle_channel_context_dup_handler_info()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Mon Mar 3 02:03:24 PST 2014


Module: telepathy-glib
Branch: next
Commit: 0af8742e8edabb3dc69dcd5362b8a94b370a7681
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=0af8742e8edabb3dc69dcd5362b8a94b370a7681

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Fri Feb 28 13:20:14 2014 +0100

test tp_handle_channel_context_dup_handler_info()

---

 tests/dbus/simple-handler.c |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c
index c4e28fe..280bab8 100644
--- a/tests/dbus/simple-handler.c
+++ b/tests/dbus/simple-handler.c
@@ -291,6 +291,16 @@ handle_channel_success (
     TpHandleChannelContext *context,
     gpointer user_data)
 {
+  GVariant *info;
+  guint u = 0;
+
+  info = tp_handle_channel_context_dup_handler_info (context);
+  g_assert (info != NULL);
+  g_assert (g_variant_is_of_type (info, G_VARIANT_TYPE_VARDICT));
+  g_variant_lookup (info, "badger", "u", &u);
+  g_assert_cmpuint (u, ==, 42);
+  g_variant_unref (info);
+
   tp_handle_channel_context_accept (context);
 }
 
@@ -354,7 +364,9 @@ call_handle_channel (Test *test)
   int i;
 
   requests_satisfied = g_hash_table_new (NULL, NULL);
-  info = g_hash_table_new (NULL, NULL);
+  info = tp_asv_new (
+      "badger", G_TYPE_UINT, 42,
+      NULL);
   chan_props = tp_tests_dup_channel_props_asv (test->text_chan);
 
   tp_proxy_add_interface_by_id (TP_PROXY (test->client),



More information about the telepathy-commits mailing list