[next] telepathy-glib: logger tests: use store constructor helpers
Simon McVittie
smcv at kemper.freedesktop.org
Thu Mar 20 10:25:43 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 471d00bf8aeefeb07f4af9524f24001422a2068c
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=471d00bf8aeefeb07f4af9524f24001422a2068c
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Mon Jan 13 18:10:29 2014 +0100
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 at 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),
More information about the telepathy-commits
mailing list