From ad4643db99b0f58132a91979635ed70d852defe9 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 13 Jan 2014 18:10:29 +0100 Subject: [PATCH 07/12] logger tests: use store constructor helpers --- tests/logger/dbus/test-tpl-log-iter-pidgin.c | 3 +-- tests/logger/dbus/test-tpl-log-iter-xml.c | 4 +--- tests/logger/dbus/test-tpl-log-store-pidgin.c | 6 +++--- tests/logger/dbus/test-tpl-log-store-xml.c | 4 +--- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/logger/dbus/test-tpl-log-iter-pidgin.c b/tests/logger/dbus/test-tpl-log-iter-pidgin.c index 76f3240..88fb458 100644 --- a/tests/logger/dbus/test-tpl-log-iter-pidgin.c +++ b/tests/logger/dbus/test-tpl-log-iter-pidgin.c @@ -55,8 +55,7 @@ setup (PidginTestCaseFixture* fixture, fixture->main_loop = g_main_loop_new (NULL, FALSE); g_assert (fixture->main_loop != NULL); - fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, - NULL); + fixture->store = _tpl_log_store_pidgin_new (); fixture->bus = tp_tests_dbus_daemon_dup_or_die (); g_assert (fixture->bus != NULL); diff --git a/tests/logger/dbus/test-tpl-log-iter-xml.c b/tests/logger/dbus/test-tpl-log-iter-xml.c index b028edb..69daef3 100644 --- a/tests/logger/dbus/test-tpl-log-iter-xml.c +++ b/tests/logger/dbus/test-tpl-log-iter-xml.c @@ -35,9 +35,7 @@ setup (XmlTestCaseFixture* fixture, GError *error = NULL; fixture->main_loop = g_main_loop_new (NULL, FALSE); - - fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML, - NULL); + fixture->store = _tpl_log_store_xml_new (); fixture->bus = tp_tests_dbus_daemon_dup_or_die (); g_assert (fixture->bus != NULL); diff --git a/tests/logger/dbus/test-tpl-log-store-pidgin.c b/tests/logger/dbus/test-tpl-log-store-pidgin.c index 255e6ee..01cbd79 100644 --- a/tests/logger/dbus/test-tpl-log-store-pidgin.c +++ b/tests/logger/dbus/test-tpl-log-store-pidgin.c @@ -175,8 +175,7 @@ setup (PidginTestCaseFixture* fixture, ".purple", "logs", NULL); DEBUG ("basedir is %s", fixture->basedir); - fixture->store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, - NULL); + fixture->store = TPL_LOG_STORE_PIDGIN (_tpl_log_store_pidgin_new ()); fixture->room = tpl_entity_new_from_room_id ( "test@conference.collabora.co.uk"); @@ -256,7 +255,8 @@ test_basedir (PidginTestCaseFixture *fixture, /* try to instantiate the default store, without passing basedir, it has to * match the real libpurple basedir */ - store = g_object_new (TPL_TYPE_LOG_STORE_PIDGIN, NULL); + store = TPL_LOG_STORE_PIDGIN (_tpl_log_store_pidgin_new ()); + dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".purple", "logs", NULL); g_assert_cmpstr (log_store_pidgin_get_basedir (store), ==, dir); diff --git a/tests/logger/dbus/test-tpl-log-store-xml.c b/tests/logger/dbus/test-tpl-log-store-xml.c index 10f190c..939ea7f 100644 --- a/tests/logger/dbus/test-tpl-log-store-xml.c +++ b/tests/logger/dbus/test-tpl-log-store-xml.c @@ -35,9 +35,7 @@ setup (XmlTestCaseFixture* fixture, GError *error = NULL; fixture->main_loop = g_main_loop_new (NULL, FALSE); - - fixture->store = g_object_new (TPL_TYPE_LOG_STORE_XML, - NULL); + fixture->store = _tpl_log_store_xml_new (); if (fixture->tmp_basedir != NULL) log_store_xml_set_basedir (TPL_LOG_STORE_XML (fixture->store), -- 1.8.4.2