[evolution-data-server/openismus-work] Fixing up various tests to compile with ported ETestDBus temporary copy of GTestDBus



commit 7bd158958bdc678b2f0c4537c4bebf409efcee27
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Fri Jan 25 19:52:55 2013 +0900

    Fixing up various tests to compile with ported ETestDBus temporary copy of GTestDBus
    
    This should fix our branch to properly compile with glib 2.32.

 tests/libebook/client/Makefile.am         |    2 ++
 tests/libebook/client/client-test-utils.c |    6 +++---
 tests/libedataserver/e-test-dbus-utils.c  |   10 +++++-----
 tests/libedataserver/e-test-dbus-utils.h  |    3 ++-
 tests/test-server-utils/e-test-dbus.h     |    2 +-
 5 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/tests/libebook/client/Makefile.am b/tests/libebook/client/Makefile.am
index af1c5bd..aa4b94b 100644
--- a/tests/libebook/client/Makefile.am
+++ b/tests/libebook/client/Makefile.am
@@ -3,6 +3,8 @@ noinst_LTLIBRARIES = libclient-test-utils.la
 libclient_test_utils_la_SOURCES =				\
 	client-test-utils.c					\
 	client-test-utils.h					\
+	$(top_srcdir)/tests/test-server-utils/e-test-dbus.c	\
+	$(top_srcdir)/tests/test-server-utils/e-test-dbus.h	\
 	$(top_srcdir)/tests/libedataserver/e-test-dbus-utils.c	\
 	$(top_srcdir)/tests/libedataserver/e-test-dbus-utils.h	\
 	$(NULL)
diff --git a/tests/libebook/client/client-test-utils.c b/tests/libebook/client/client-test-utils.c
index 2901e69..267534b 100644
--- a/tests/libebook/client/client-test-utils.c
+++ b/tests/libebook/client/client-test-utils.c
@@ -101,7 +101,7 @@ void
 main_initialize (void)
 {
 	static gboolean initialized = FALSE;
-	GTestDBus *test_dbus = NULL;
+	ETestDBus *test_dbus = NULL;
 
 	if (initialized)
 		return;
@@ -114,10 +114,10 @@ main_initialize (void)
 	e_test_setup_base_directories ();
 	test_dbus = e_test_setup_dbus_session ();
 
-	g_test_dbus_up (test_dbus);
+	e_test_dbus_up (test_dbus);
 
 	g_print ("Using private D-Bus session for testing: \"%s\"\n",
-                 g_test_dbus_get_bus_address (test_dbus));
+                 e_test_dbus_get_bus_address (test_dbus));
 
 	initialized = TRUE;
 }
diff --git a/tests/libedataserver/e-test-dbus-utils.c b/tests/libedataserver/e-test-dbus-utils.c
index 7bc592e..0388f3d 100644
--- a/tests/libedataserver/e-test-dbus-utils.c
+++ b/tests/libedataserver/e-test-dbus-utils.c
@@ -148,7 +148,7 @@ e_test_clean_base_directories (GError **error)
 }
 
 static void
-register_dbus_service_dir (GTestDBus *test_dbus,
+register_dbus_service_dir (ETestDBus *test_dbus,
                            const gchar *data_dir)
 {
 	gchar *service_dir;
@@ -156,15 +156,15 @@ register_dbus_service_dir (GTestDBus *test_dbus,
 	service_dir = g_build_filename (data_dir, "dbus-1", "services", NULL);
 
 	g_print ("Adding service dir: %s\n", service_dir);
-	g_test_dbus_add_service_dir (test_dbus, service_dir);
+	e_test_dbus_add_service_dir (test_dbus, service_dir);
 
 	g_free (service_dir);
 }
 
-GTestDBus *
+ETestDBus *
 e_test_setup_dbus_session (void)
 {
-	GTestDBus *test_dbus;
+	ETestDBus *test_dbus;
 	const gchar * const *system_data_dirs;
 	gint ii;
 
@@ -173,7 +173,7 @@ e_test_setup_dbus_session (void)
 	system_data_dirs = g_get_system_data_dirs ();
 	g_assert (system_data_dirs != NULL);
 
-	test_dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
+	test_dbus = e_test_dbus_new (E_TEST_DBUS_NONE);
 	register_dbus_service_dir (test_dbus, DATADIR);
 
 	for (ii = 0; system_data_dirs[ii] != NULL; ii++) {
diff --git a/tests/libedataserver/e-test-dbus-utils.h b/tests/libedataserver/e-test-dbus-utils.h
index 8518ffc..0522a2e 100644
--- a/tests/libedataserver/e-test-dbus-utils.h
+++ b/tests/libedataserver/e-test-dbus-utils.h
@@ -20,13 +20,14 @@
 #define E_TEST_DBUS_UTILS_H
 
 #include <gio/gio.h>
+#include "e-test-dbus.h"
 
 G_BEGIN_DECLS
 
 const gchar *	e_test_setup_base_directories	(void);
 gboolean	e_test_clean_base_directories	(GError **error);
 
-GTestDBus *	e_test_setup_dbus_session	(void);
+ETestDBus *	e_test_setup_dbus_session	(void);
 
 G_END_DECLS
 
diff --git a/tests/test-server-utils/e-test-dbus.h b/tests/test-server-utils/e-test-dbus.h
index 08c4f45..3e77742 100644
--- a/tests/test-server-utils/e-test-dbus.h
+++ b/tests/test-server-utils/e-test-dbus.h
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
     (e_test_dbus_get_type ())
 #define E_TEST_DBUS(obj) \
     (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_TEST_DBUS, \
-        GTestDBus))
+        ETestDBus))
 #define E_IS_TEST_DBUS(obj) \
     (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_TEST_DBUS))
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]