[evolution-data-server/openismus-work-master: 97/118] Changes for Review: Test cases and example updated for new API changes.



commit 5b1c6bc9d36b1e169a35297217f13f7ee0aef34d
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Oct 5 02:06:11 2013 +0200

    Changes for Review: Test cases and example updated for new API changes.

 tests/cursor-example/cursor-data.c                 |    2 +-
 tests/libebook/client/test-client-cursor-create.c  |    4 ++--
 .../client/test-client-cursor-operations.c         |    2 +-
 tests/libedata-book/data-test-utils.c              |   10 +++++-----
 tests/libedata-book/data-test-utils.h              |    8 ++++----
 tests/libedata-book/test-sqlite-create-cursor.c    |    8 ++++----
 tests/libedata-book/test-sqlite-cursor-calculate.c |    4 ++--
 .../test-sqlite-cursor-move-by-en-US.c             |    4 ++--
 8 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/tests/cursor-example/cursor-data.c b/tests/cursor-example/cursor-data.c
index 00e9961..a2e8437 100644
--- a/tests/cursor-example/cursor-data.c
+++ b/tests/cursor-example/cursor-data.c
@@ -290,7 +290,7 @@ static EBookClientCursor *
 get_cursor (EBookClient *book_client)
 {
   EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-  EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+  EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING };
   EBookClientCursor *cursor = NULL;
   GError *error = NULL;
 
diff --git a/tests/libebook/client/test-client-cursor-create.c 
b/tests/libebook/client/test-client-cursor-create.c
index 25795da..899bbb6 100644
--- a/tests/libebook/client/test-client-cursor-create.c
+++ b/tests/libebook/client/test-client-cursor-create.c
@@ -31,11 +31,11 @@ static ETestServerClosure book_closure_direct_async = { E_TEST_SERVER_DIRECT_ADD
 
 #define N_VALID_SORT_FIELDS 2
 static EContactField valid_sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-static EBookSortType valid_sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+static EBookCursorSortType valid_sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING 
};
 
 #define N_INVALID_SORT_FIELDS 1
 static EContactField invalid_sort_fields[] = { E_CONTACT_TEL };
-static EBookSortType invalid_sort_types[] = { E_BOOK_SORT_ASCENDING };
+static EBookCursorSortType invalid_sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING };
 
 static void
 test_cursor_create_empty_query_sync (ETestServerFixture *fixture,
diff --git a/tests/libebook/client/test-client-cursor-operations.c 
b/tests/libebook/client/test-client-cursor-operations.c
index 5a68d47..98361f6 100644
--- a/tests/libebook/client/test-client-cursor-operations.c
+++ b/tests/libebook/client/test-client-cursor-operations.c
@@ -219,7 +219,7 @@ struct _CursorTest {
  ******************************************************/
 #define N_SORT_FIELDS 2
 static EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-static EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+static EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING };
 
 static gboolean
 cursor_timeout (const gchar *error_message)
diff --git a/tests/libedata-book/data-test-utils.c b/tests/libedata-book/data-test-utils.c
index c5f4c44..b5f3ffc 100644
--- a/tests/libedata-book/data-test-utils.c
+++ b/tests/libedata-book/data-test-utils.c
@@ -225,7 +225,7 @@ e_sqlitedb_cursor_fixture_setup (EbSdbCursorFixture *fixture,
        ESqliteDBFixture *ebsdb_fixture = (ESqliteDBFixture *)fixture;
        EbSdbCursorClosure *data = (EbSdbCursorClosure *)user_data;
        EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-       EBookSortType sort_types[] = { data->sort_type, data->sort_type };
+       EBookCursorSortType sort_types[] = { data->sort_type, data->sort_type };
        EBookClient *book_client;
        GSList *contacts = NULL;
        GError *error = NULL;
@@ -495,7 +495,7 @@ move_by_test_new_internal (const gchar *test_path,
        data->parent.parent.type = E_TEST_SERVER_ADDRESS_BOOK;
        data->parent.parent.customize = e_sqlitedb_cursor_fixture_setup_book;
        data->parent.locale = g_strdup (locale);
-       data->parent.sort_type = E_BOOK_SORT_ASCENDING;
+       data->parent.sort_type = E_BOOK_CURSOR_SORT_ASCENDING;
        data->path = g_strdup (test_path);
        data->struct_size = struct_size;
 
@@ -522,9 +522,9 @@ move_by_test_new (const gchar *test_path,
 }
 
 MoveByData *
-move_by_test_new_full (const gchar   *test_path,
-                      const gchar   *locale,
-                      EBookSortType  sort_type)
+move_by_test_new_full (const gchar         *test_path,
+                      const gchar         *locale,
+                      EBookCursorSortType  sort_type)
 {
        MoveByData *data;
 
diff --git a/tests/libedata-book/data-test-utils.h b/tests/libedata-book/data-test-utils.h
index 58d865f..10108a6 100644
--- a/tests/libedata-book/data-test-utils.h
+++ b/tests/libedata-book/data-test-utils.h
@@ -92,10 +92,10 @@ typedef struct {
 } EbSdbCursorFixture;
 
 typedef struct {
-       ETestServerClosure parent;
+       ETestServerClosure  parent;
 
-       const gchar   *locale;
-       EBookSortType  sort_type;
+       const gchar        *locale;
+       EBookCursorSortType sort_type;
 } EbSdbCursorClosure;
 
 typedef struct {
@@ -157,7 +157,7 @@ MoveByData *move_by_test_new               (const gchar *test_path,
                                            const gchar *locale);
 MoveByData *move_by_test_new_full          (const gchar   *test_path,
                                            const gchar   *locale,
-                                           EBookSortType  sort_type);
+                                           EBookCursorSortType sort_type);
 void        move_by_test_add               (MoveByData  *data,
                                            gboolean     filtered);
 
diff --git a/tests/libedata-book/test-sqlite-create-cursor.c b/tests/libedata-book/test-sqlite-create-cursor.c
index 3479e78..399ad09 100644
--- a/tests/libedata-book/test-sqlite-create-cursor.c
+++ b/tests/libedata-book/test-sqlite-create-cursor.c
@@ -14,7 +14,7 @@ test_create_cursor_empty_query (ESqliteDBFixture *fixture,
 {
        EbSdbCursor  *cursor;
        EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-       EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+       EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING };
        GError       *error = NULL;
 
        cursor = e_book_backend_sqlitedb_cursor_new (fixture->ebsdb, SQLITEDB_FOLDER_ID, NULL,
@@ -30,7 +30,7 @@ test_create_cursor_valid_query (ESqliteDBFixture *fixture,
 {
        EbSdbCursor  *cursor;
        EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-       EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+       EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING };
        EBookQuery   *query;
        gchar        *sexp;
        GError       *error = NULL;
@@ -53,7 +53,7 @@ test_create_cursor_invalid_query (ESqliteDBFixture *fixture,
 {
        EbSdbCursor  *cursor;
        EContactField sort_fields[] = { E_CONTACT_FAMILY_NAME, E_CONTACT_GIVEN_NAME };
-       EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING, E_BOOK_SORT_ASCENDING };
+       EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING, E_BOOK_CURSOR_SORT_ASCENDING };
        EBookQuery   *query;
        gchar        *sexp;
        GError       *error = NULL;
@@ -78,7 +78,7 @@ test_create_cursor_invalid_sort (ESqliteDBFixture *fixture,
 {
        EbSdbCursor  *cursor;
        EContactField sort_fields[] = { E_CONTACT_TEL };
-       EBookSortType sort_types[] = { E_BOOK_SORT_ASCENDING };
+       EBookCursorSortType sort_types[] = { E_BOOK_CURSOR_SORT_ASCENDING };
        GError       *error = NULL;
 
        cursor = e_book_backend_sqlitedb_cursor_new (fixture->ebsdb, SQLITEDB_FOLDER_ID, NULL,
diff --git a/tests/libedata-book/test-sqlite-cursor-calculate.c 
b/tests/libedata-book/test-sqlite-cursor-calculate.c
index fc9a99f..2d1621f 100644
--- a/tests/libedata-book/test-sqlite-cursor-calculate.c
+++ b/tests/libedata-book/test-sqlite-cursor-calculate.c
@@ -9,13 +9,13 @@
 static EbSdbCursorClosure ascending_closure = {
        { E_TEST_SERVER_ADDRESS_BOOK, e_sqlitedb_cursor_fixture_setup_book, 0 },
        NULL, 
-       E_BOOK_SORT_ASCENDING
+       E_BOOK_CURSOR_SORT_ASCENDING
 };
 
 static EbSdbCursorClosure descending_closure = {
        { E_TEST_SERVER_ADDRESS_BOOK, e_sqlitedb_cursor_fixture_setup_book, 0 },
        NULL, 
-       E_BOOK_SORT_DESCENDING
+       E_BOOK_CURSOR_SORT_DESCENDING
 };
 
 static void
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
index dc8f4c0..2876a16 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
@@ -43,7 +43,7 @@ main (gint argc,
        move_by_test_add (data, TRUE);
 
        data = move_by_test_new_full ("/EbSdbCursor/en_US/Move/Descending/Forward", "en_US.UTF-8",
-                                     E_BOOK_SORT_DESCENDING);
+                                     E_BOOK_CURSOR_SORT_DESCENDING);
        move_by_test_add_assertion (data, 5, 20, 19, 9,  13, 12);
        move_by_test_add_assertion (data, 5, 14, 10, 18, 16, 17);
        move_by_test_add_assertion (data, 5, 15, 8,  7,  3,  4);
@@ -51,7 +51,7 @@ main (gint argc,
        move_by_test_add (data, FALSE);
 
        data = move_by_test_new_full ("/EbSdbCursor/en_US/Move/Descending/Forward/Loop", "en_US.UTF-8",
-                                     E_BOOK_SORT_DESCENDING);
+                                     E_BOOK_CURSOR_SORT_DESCENDING);
        move_by_test_add_assertion (data, 10, 20, 19, 9,  13, 12, 14, 10, 18, 16, 17);
        move_by_test_add_assertion (data, 11, 15, 8,  7,  3,  4, 6,  5,  2,  1,  11, 0);
 


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