summaryrefslogtreecommitdiff
path: root/tests/dbus.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-07-11 11:32:37 -0400
committerRyan Lortie <desrt@desrt.ca>2012-07-11 11:34:10 -0400
commitb9e39fc6812d06769bbeec491e6dc2b71d697599 (patch)
tree5794b6df0046d99d160ec12ada842471660db101 /tests/dbus.c
parent8b238d78d86068b1c5d002865d59ffb906f0432f (diff)
downloaddconf-b9e39fc6812d06769bbeec491e6dc2b71d697599.tar.gz
dbus test: add function to initialise for testing
We were hardcoding g_type_init() in the D-Bus testcase because the GDBus backend depended on that happening. That is not true for the libdbus-1 backend, so split it out into a separate function implemeneted by the backend.
Diffstat (limited to 'tests/dbus.c')
-rw-r--r--tests/dbus.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/dbus.c b/tests/dbus.c
index 6b7f07b..d37ab02 100644
--- a/tests/dbus.c
+++ b/tests/dbus.c
@@ -403,11 +403,10 @@ main (int argc, char **argv)
{
g_test_init (&argc, &argv, NULL);
- /* XXX should not need to do this here! */
- g_type_init ();
-
main_thread = g_thread_self ();
+ dconf_engine_dbus_init_for_testing ();
+
/* test_creation_error absolutely must come first */
g_test_add_func (DBUS_BACKEND "/creation/error", test_creation_error);
g_test_add_func (DBUS_BACKEND "/sync-call/success", test_sync_call_success);