diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-28 16:26:12 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-02-28 16:26:12 +0100 |
commit | 2d8217676a5765fa580d48f37310ecc0b2c8a5f1 (patch) | |
tree | 66ed34d610addcb97456d39d822cb6b5a5e20330 | |
parent | a4d1165fcd95eaadbc662c89497386545c90ca56 (diff) |
test creating a TpProtocol by passing its immutable props
-rw-r--r-- | tests/dbus/protocol-objects.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c index 5a7515696..5498d4c9f 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 |