From d1c7d852e74747d09be3ede8f3a128dbf944bb67 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 28 Feb 2014 13:20:14 +0100 Subject: [PATCH 2/3] 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), -- 1.8.5.3