telepathy-glib: test creating a TpProtocol by passing its immutable props
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Mon Mar 3 02:17:06 PST 2014
Module: telepathy-glib
Branch: master
Commit: 2d8217676a5765fa580d48f37310ecc0b2c8a5f1
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=2d8217676a5765fa580d48f37310ecc0b2c8a5f1
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Fri Feb 28 16:26:12 2014 +0100
test creating a TpProtocol by passing its immutable props
---
tests/dbus/protocol-objects.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c
index 5a75156..5498d4c 100644
--- a/tests/dbus/protocol-objects.c
+++ b/tests/dbus/protocol-objects.c
@@ -451,6 +451,9 @@ static void
test_protocol_object (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
+ GHashTable *props;
+ TpProtocol *protocol;
+
g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
"example_echo_2");
tp_tests_proxy_run_until_prepared (test->cm, NULL);
@@ -458,6 +461,22 @@ test_protocol_object (Test *test,
tp_connection_manager_get_protocol_object (test->cm, "example"));
check_tp_protocol (test->protocol);
+
+ /* Create a new TpProtocol for the same protocol but by passing it all its
+ * immutable properities */
+ g_object_get (test->protocol,
+ "protocol-properties", &props,
+ NULL);
+
+ protocol = tp_protocol_new (test->dbus, "example_echo_2",
+ "example", props, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_PROTOCOL (protocol));
+
+ check_tp_protocol (protocol);
+
+ g_object_unref (protocol);
+ g_hash_table_unref (props);
}
static void
More information about the telepathy-commits
mailing list