diff options
Diffstat (limited to 'tests/dbus-interface.c')
-rw-r--r-- | tests/dbus-interface.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dbus-interface.c b/tests/dbus-interface.c index 28ce314..2427b34 100644 --- a/tests/dbus-interface.c +++ b/tests/dbus-interface.c @@ -184,9 +184,12 @@ slmock_check_login(GDBusConnection * session, slmock_table_t * slmockdata, gbool GVariant * array = g_variant_get_child_value(retval, 2); int i; + // Check all servers should be in the result are in the result for (i = 0; slmockdata->servers[i].name != NULL; i++) { g_assert(find_server(array, &slmockdata->servers[i])); } + // Check there is no more servers in the result than we expected + g_assert(i == g_variant_n_children(array)); g_variant_unref(array); g_variant_unref(retval); @@ -568,7 +571,9 @@ test_dbus_suite (void) gint main (gint argc, gchar * argv[]) { +#if !GLIB_CHECK_VERSION (2, 35, 1) g_type_init(); +#endif g_test_init(&argc, &argv, NULL); /* Test suites */ |