[evolution-data-server/openismus-work-master: 6/13] Make the libebook tests use direct read access by default
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 6/13] Make the libebook tests use direct read access by default
- Date: Fri, 7 Dec 2012 08:02:09 +0000 (UTC)
commit 6f244d2b7741c323e63e5dda095f383cc78da4f8
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Tue Nov 6 16:18:56 2012 +0900
Make the libebook tests use direct read access by default
tests/libebook/client/Makefile.am | 2 +-
tests/libebook/client/client-test-utils.c | 8 +++++++-
tests/libebook/client/test-client-custom-summary.c | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/tests/libebook/client/Makefile.am b/tests/libebook/client/Makefile.am
index 4062052..2805bef 100644
--- a/tests/libebook/client/Makefile.am
+++ b/tests/libebook/client/Makefile.am
@@ -66,7 +66,7 @@ TEST_LIBS = \
$(top_builddir)/addressbook/libebook/libebook-1.2.la \
$(EVOLUTION_ADDRESSBOOK_LIBS) \
$(NULL)
-
+
RUN_WITH_PRIVATE_BUS = $(top_srcdir)/tests/tools/with-session-bus-eds.sh
TESTS_ENVIRONMENT = \
diff --git a/tests/libebook/client/client-test-utils.c b/tests/libebook/client/client-test-utils.c
index 26cce75..0e8cd27 100644
--- a/tests/libebook/client/client-test-utils.c
+++ b/tests/libebook/client/client-test-utils.c
@@ -7,6 +7,12 @@
#include "client-test-utils.h"
+/* This forces the GType to be registered in a way that
+ * avoids a "statement with no effect" compiler warning.
+ * FIXME Use g_type_ensure() once we require GLib 2.34. */
+#define REGISTER_TYPE(type) \
+ (g_type_class_unref (g_type_class_ref (type)))
+
void
report_error (const gchar *operation,
GError **error)
@@ -309,7 +315,7 @@ create_book_idle (CreateBookData *data)
if (!data->source)
g_error ("Unable to fetch newly created source uid '%s' from the registry", data->uid);
- data->book = e_book_client_new (data->source, &error);
+ data->book = e_book_client_new_direct (data->registry, data->source, &error);
if (!data->book)
g_error ("Unable to create the book: %s", error->message);
diff --git a/tests/libebook/client/test-client-custom-summary.c b/tests/libebook/client/test-client-custom-summary.c
index b2fbbea..9f44447 100644
--- a/tests/libebook/client/test-client-custom-summary.c
+++ b/tests/libebook/client/test-client-custom-summary.c
@@ -34,7 +34,7 @@ create_book_idle (CreateBookData *data)
if (!data->source)
g_error ("Unable to fetch newly created source uid '%s' from the registry", data->uid);
- data->book = e_book_client_new (data->source, &error);
+ data->book = e_book_client_new_direct (data->registry, data->source, &error);
if (!data->book)
g_error ("Unable to create the book: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]