From 1041fc21905767fc15cf1ec9a4ff3ecb0fdcd6d9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 24 Dec 2013 00:05:01 -0500 Subject: [PATCH] Improve gdbus test coverage --- gio/tests/gdbus-peer.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c index f0e93b4..6deee41 100644 --- a/gio/tests/gdbus-peer.c +++ b/gio/tests/gdbus-peer.c @@ -1596,6 +1596,7 @@ codegen_test_peer (void) GThread *service_thread; GError *error = NULL; GVariant *value; + const gchar *s; /* bring up a server - we run the server in a different thread to avoid deadlocks */ service_thread = g_thread_new ("codegen_test_peer", @@ -1659,6 +1660,16 @@ codegen_test_peer (void) example_animal_call_poke_sync (animal2, FALSE, TRUE, NULL, &error); g_assert_no_error (error); + /* Some random unrelated call, just to get some test coverage */ + value = g_dbus_proxy_call_sync (G_DBUS_PROXY (animal2), + "org.freedesktop.DBus.Peer.GetMachineId", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, + NULL, &error); + g_assert_no_error (error); + g_variant_get (value, "(&s)", &s); + g_assert (g_dbus_is_guid (s)); + g_variant_unref (value); + /* Poke server and make sure animal is updated */ value = g_dbus_proxy_call_sync (G_DBUS_PROXY (animal2), "org.freedesktop.DBus.Peer.Ping", -- 2.7.4