[evolution-data-server/openismus-work-master: 4/72] ECalClient tests: Use async apis to open the client for every async test.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work-master: 4/72] ECalClient tests: Use async apis to open the client for every async test.
- Date: Thu, 4 Jul 2013 19:09:27 +0000 (UTC)
commit 632ab2f6d4ffd3a85b4a173f2b1154006af3166b
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Wed Apr 24 17:48:42 2013 +0900
ECalClient tests: Use async apis to open the client for every async test.
tests/libecal/client/test-client-add-timezone.c | 10 ++++++----
tests/libecal/client/test-client-create-object.c | 10 ++++++----
.../client/test-client-get-attachment-uris.c | 10 ++++++----
tests/libecal/client/test-client-get-object-list.c | 10 ++++++----
tests/libecal/client/test-client-get-view.c | 10 ++++++----
tests/libecal/client/test-client-modify-object.c | 10 ++++++----
tests/libecal/client/test-client-receive-objects.c | 10 ++++++----
tests/libecal/client/test-client-refresh.c | 10 ++++++----
tests/libecal/client/test-client-remove-object.c | 12 +++++++-----
tests/libecal/client/test-client-revision-view.c | 10 ++++++----
tests/libecal/client/test-client-send-objects.c | 10 ++++++----
11 files changed, 67 insertions(+), 45 deletions(-)
---
diff --git a/tests/libecal/client/test-client-add-timezone.c b/tests/libecal/client/test-client-add-timezone.c
index 8ef5a65..f2f667a 100644
--- a/tests/libecal/client/test-client-add-timezone.c
+++ b/tests/libecal/client/test-client-add-timezone.c
@@ -9,8 +9,10 @@
#define TZID_NEW "XYZ"
#define TZNAME_NEW "Ex Wye Zee"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
test_add_timezone_sync (ETestServerFixture *fixture,
@@ -137,14 +139,14 @@ main (gint argc,
g_test_add (
"/ECalClient/AddTimezone/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_add_timezone_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/AddTimezone/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_add_timezone_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-create-object.c
b/tests/libecal/client/test-client-create-object.c
index c8d1a8c..efe481d 100644
--- a/tests/libecal/client/test-client-create-object.c
+++ b/tests/libecal/client/test-client-create-object.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
test_icalcomps (icalcomponent *icalcomp1,
@@ -215,14 +217,14 @@ main (gint argc,
g_test_add (
"/ECalClient/CreateObject/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_create_object_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/CreateObject/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_create_object_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-get-attachment-uris.c
b/tests/libecal/client/test-client-get-attachment-uris.c
index 78c32f0..a71d69e 100644
--- a/tests/libecal/client/test-client-get-attachment-uris.c
+++ b/tests/libecal/client/test-client-get-attachment-uris.c
@@ -11,8 +11,10 @@
#define ATTACH2 "file:///tmp/file2"
#define ATTACH3 "file:///tmp/dir/fileěščřžýáíé3"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
add_attach (icalcomponent *icalcomp,
@@ -152,14 +154,14 @@ main (gint argc,
g_test_add (
"/ECalClient/GetAttachmentUris/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_get_attachment_uris_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/GetAttachmentUris/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_get_attachment_uris_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-get-object-list.c
b/tests/libecal/client/test-client-get-object-list.c
index 04ac694..4c35dd1 100644
--- a/tests/libecal/client/test-client-get-object-list.c
+++ b/tests/libecal/client/test-client-get-object-list.c
@@ -9,8 +9,10 @@
#define EVENT_SUMMARY "Creation of new test event"
#define EVENT_QUERY "(contains? \"summary\" \"" EVENT_SUMMARY "\")"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
setup_cal (ECalClient *cal_client)
@@ -139,14 +141,14 @@ main (gint argc,
g_test_add (
"/ECalClient/GetObjectList/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_get_object_list_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/GetObjectList/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_get_object_list_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-get-view.c b/tests/libecal/client/test-client-get-view.c
index 6ef0118..ffa3a21 100644
--- a/tests/libecal/client/test-client-get-view.c
+++ b/tests/libecal/client/test-client-get-view.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
typedef enum {
SUBTEST_OBJECTS_ADDED,
@@ -216,14 +218,14 @@ main (gint argc,
g_test_add (
"/ECalClient/GetView/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_get_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/GetView/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_get_view_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-modify-object.c
b/tests/libecal/client/test-client-modify-object.c
index 7da3dcd..3400f18 100644
--- a/tests/libecal/client/test-client-modify-object.c
+++ b/tests/libecal/client/test-client-modify-object.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
#define EVENT_SUMMARY "Creation of new test event"
@@ -136,14 +138,14 @@ main (gint argc,
g_test_add (
"/ECalClient/ModifyObject/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_modify_object_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/ModifyObject/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_modify_object_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-receive-objects.c
b/tests/libecal/client/test-client-receive-objects.c
index aaaa789..4070f37 100644
--- a/tests/libecal/client/test-client-receive-objects.c
+++ b/tests/libecal/client/test-client-receive-objects.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static icalcomponent *
create_object (void)
@@ -91,14 +93,14 @@ main (gint argc,
g_test_add (
"/ECalClient/ReceiveObjects/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_receive_objects_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/ReceiveObjects/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_receive_objects_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-refresh.c b/tests/libecal/client/test-client-refresh.c
index 3aaa845..5345355 100644
--- a/tests/libecal/client/test-client-refresh.c
+++ b/tests/libecal/client/test-client-refresh.c
@@ -7,8 +7,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
setup_cal (ECalClient *cal_client)
@@ -100,14 +102,14 @@ main (gint argc,
g_test_add (
"/ECalClient/Refresh/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_refresh_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/Refresh/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_refresh_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-remove-object.c
b/tests/libecal/client/test-client-remove-object.c
index 4b4287f..f5f410f 100644
--- a/tests/libecal/client/test-client-remove-object.c
+++ b/tests/libecal/client/test-client-remove-object.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static gchar *
create_object (ECalClient *cal_client)
@@ -117,21 +119,21 @@ main (gint argc,
g_test_add (
"/ECalClient/RemoveObject/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_remove_object_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/RemoveObject/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_remove_object_async,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/RemoveObject/EmptyUid",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_remove_object_empty_uid,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-revision-view.c
b/tests/libecal/client/test-client-revision-view.c
index 396298b..95e33ce 100644
--- a/tests/libecal/client/test-client-revision-view.c
+++ b/tests/libecal/client/test-client-revision-view.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
typedef enum {
SUBTEST_OBJECTS_ADDED,
@@ -266,14 +268,14 @@ main (gint argc,
g_test_add (
"/ECalClient/GetRevisionView/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_get_revision_view_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/GetRevisionView/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_get_revision_view_async,
e_test_server_utils_teardown);
diff --git a/tests/libecal/client/test-client-send-objects.c b/tests/libecal/client/test-client-send-objects.c
index 1d1a809..10312c1 100644
--- a/tests/libecal/client/test-client-send-objects.c
+++ b/tests/libecal/client/test-client-send-objects.c
@@ -6,8 +6,10 @@
#include "e-test-server-utils.h"
-static ETestServerClosure cal_closure =
- { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS };
+static ETestServerClosure cal_closure_sync =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, FALSE };
+static ETestServerClosure cal_closure_async =
+ { E_TEST_SERVER_CALENDAR, NULL, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL, TRUE };
static void
print_ecomp (ECalComponent *ecalcomp)
@@ -158,14 +160,14 @@ main (gint argc,
g_test_add (
"/ECalClient/SendObjects/Sync",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_sync,
e_test_server_utils_setup,
test_send_objects_sync,
e_test_server_utils_teardown);
g_test_add (
"/ECalClient/SendObjects/Async",
ETestServerFixture,
- &cal_closure,
+ &cal_closure_async,
e_test_server_utils_setup,
test_send_objects_async,
e_test_server_utils_teardown);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]