[evolution-data-server/openismus-work-master: 43/81] Fixed existing cursor tests for POSIX locale to work with Alphabetic Indexing



commit 97d10c328ef93e4c634aac0674675e04c193b8e2
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Sat Jun 8 17:52:53 2013 +0900

    Fixed existing cursor tests for POSIX locale to work with Alphabetic Indexing
    
    Now that sort keys are prefixed with the alphabetic index, POSIX sorting has
    changed to adhere to the alphabetic index.

 tests/libedata-book/data-test-utils.h              |   30 ++++++++++----------
 .../test-sqlite-cursor-change-locale.c             |    6 ++--
 .../test-sqlite-cursor-move-by-posix.c             |   14 ++++----
 .../test-sqlite-cursor-posix-initial.c             |    6 ++--
 .../test-sqlite-cursor-posix-migrated.c            |    6 ++--
 5 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/tests/libedata-book/data-test-utils.h b/tests/libedata-book/data-test-utils.h
index 5ec726a..38ecda1 100644
--- a/tests/libedata-book/data-test-utils.h
+++ b/tests/libedata-book/data-test-utils.h
@@ -45,21 +45,21 @@
  * | 3   | Yes   | Bat         | Bäd         6  | Bad         2  | Bad         2  | Bad         2  |
  * | 4   | No    | bat         | Bat         3  | bäd         5  | bäd         5  | bäd         5  |
  * | 5   | Yes   | bäd         | Bät         8  | Bäd         6  | Bäd         6  | Bäd         6  |
- * | 6   | No    | Bäd         | C           10 | bat         4  | bat         4  | bät         7  |
- * | 7   | No    | bät         | Muffler     19 | Bat         3  | Bat         3  | Bät         8  |
- * | 8   | Yes   | Bät         | Müller      20 | bät         7  | bät         7  | bat         4  |
- * | 9   | Yes   | côté        | bad         1  | Bät         8  | Bät         8  | Bat         3  |
- * | 10  | Yes   | C           | bäd         5  | black-bird  15 | black-bird  15 | black-bird  15 |
- * | 11  | Yes   |             | bat         4  | black-birds 17 | black-birds 17 | black-birds 17 |
- * | 12  | Yes   | coté        | bät         7  | blackbird   16 | blackbird   16 | blackbird   16 |
- * | 13  | No    | côte        | black-bird  15 | blackbirds  18 | blackbirds  18 | blackbirds  18 |
- * | 14  | Yes   | cote        | black-birds 17 | C           10 | C           10 | C           10 |
- * | 15  | No    | black-bird  | blackbird   16 | cote        14 | cote        14 | cote        14 |
- * | 16  | Yes   | blackbird   | blackbirds  18 | coté        12 | côte        13 | coté        12 | 
- * | 17  | Yes   | black-birds | cote        14 | côte        13 | coté        12 | côte        13 | 
- * | 18  | Yes   | blackbirds  | coté        12 | côté        9  | côté        9  | côté        9  | 
- * | 19  | No    | Muffler     | côte        13 | Muffler     19 | Muffler     19 | Müller      20 | 
- * | 20  | No    | Müller      | côté        9  | Müller      20 | Müller      20 | Muffler     19 |
+ * | 6   | No    | Bäd         | bad         1  | bat         4  | bat         4  | bät         7  |
+ * | 7   | No    | bät         | bäd         5  | Bat         3  | Bat         3  | Bät         8  |
+ * | 8   | Yes   | Bät         | bat         4  | bät         7  | bät         7  | bat         4  |
+ * | 9   | Yes   | côté        | bät         7  | Bät         8  | Bät         8  | Bat         3  |
+ * | 10  | Yes   | C           | black-bird  15 | black-bird  15 | black-bird  15 | black-bird  15 |
+ * | 11  | Yes   |             | black-birds 17 | black-birds 17 | black-birds 17 | black-birds 17 |
+ * | 12  | Yes   | coté        | blackbird   16 | blackbird   16 | blackbird   16 | blackbird   16 |
+ * | 13  | No    | côte        | blackbirds  18 | blackbirds  18 | blackbirds  18 | blackbirds  18 |
+ * | 14  | Yes   | cote        | C           10 | C           10 | C           10 | C           10 |
+ * | 15  | No    | black-bird  | cote        14 | cote        14 | cote        14 | cote        14 |
+ * | 16  | Yes   | blackbird   | coté        12 | coté        12 | côte        13 | coté        12 | 
+ * | 17  | Yes   | black-birds | côte        13 | côte        13 | coté        12 | côte        13 | 
+ * | 18  | Yes   | blackbirds  | côté        9  | côté        9  | côté        9  | côté        9  | 
+ * | 19  | No    | Muffler     | Muffler     19 | Muffler     19 | Muffler     19 | Müller      20 | 
+ * | 20  | No    | Müller      | Müller      20 | Müller      20 | Müller      20 | Muffler     19 |
  * +-----------------------------------------------------------------------------------------------+
  *
  * See this ICU demo to check additional sort ordering by ICU in various locales:
diff --git a/tests/libedata-book/test-sqlite-cursor-change-locale.c 
b/tests/libedata-book/test-sqlite-cursor-change-locale.c
index c11502d..fd322ab 100644
--- a/tests/libedata-book/test-sqlite-cursor-change-locale.c
+++ b/tests/libedata-book/test-sqlite-cursor-change-locale.c
@@ -21,9 +21,9 @@ main (gint argc,
 
        data = move_by_test_new ("/EbSdbCursor/ChangeLocale/POSIX", "POSIX");
        move_by_test_add_assertion (data, 5, 11, 2,  6,  3,  8);
-       move_by_test_add_assertion (data, 5, 10, 19, 20, 1,  5);
-       move_by_test_add_assertion (data, 5, 4,  7,  15, 17, 16);
-       move_by_test_add_assertion (data, 5, 18, 14, 12, 13, 9);
+       move_by_test_add_assertion (data, 5, 1,  5,  4,  7,  15);
+       move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
+       move_by_test_add_assertion (data, 5, 12, 13, 9,  19, 20);
        move_by_test_add (data, FALSE);
 
        data = move_by_test_new ("/EbSdbCursor/ChangeLocale/en_US", "en_US.UTF-8");
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c 
b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
index b35990a..01eed6a 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
@@ -19,7 +19,7 @@ main (gint argc,
 
        data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Forward", "POSIX");
        move_by_test_add_assertion (data, 5, 11, 2, 6, 3, 8);
-       move_by_test_add_assertion (data, 6, 10, 19, 20, 1, 5, 4);
+       move_by_test_add_assertion (data, 6, 1,  5,  4,  7,  15, 17);
        move_by_test_add (data, FALSE);
 
        data = move_by_test_new ("/EbSdbCursor/POSIX/Move/ForwardOnNameless", "POSIX");
@@ -28,18 +28,18 @@ main (gint argc,
        move_by_test_add (data, FALSE);
 
        data = move_by_test_new ("/EbSdbCursor/POSIX/Move/Backwards", "POSIX");
-       move_by_test_add_assertion (data, -5, 9, 13, 12, 14, 18);
-       move_by_test_add_assertion (data, -12, 16, 17, 15, 7, 4, 5, 1, 20, 19, 10, 8, 3);
+       move_by_test_add_assertion (data, -5, 20, 19, 9, 13, 12);
+       move_by_test_add_assertion (data, -12, 14, 10, 18, 16, 17, 15, 7, 4, 5, 1, 8, 3);
        move_by_test_add (data, FALSE);
 
        data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Forward", "POSIX");
-       move_by_test_add_assertion (data, 5, 11, 2, 3, 8, 10);
-       move_by_test_add_assertion (data, 8, 1, 5, 17, 16, 18, 14, 12, 9);
+       move_by_test_add_assertion (data, 5, 11, 2, 3, 8, 1);
+       move_by_test_add_assertion (data, 8, 5, 17, 16, 18, 10, 14, 12, 9);
        move_by_test_add (data, TRUE);
 
        data = move_by_test_new ("/EbSdbCursor/POSIX/Filtered/Move/Backwards", "POSIX");
-       move_by_test_add_assertion (data, -5, 9, 12, 14, 18, 16);
-       move_by_test_add_assertion (data, -8, 17, 5, 1, 10, 8, 3, 2, 11);
+       move_by_test_add_assertion (data, -5, 9, 12, 14, 10, 18);
+       move_by_test_add_assertion (data, -8, 16, 17, 5, 1, 8, 3, 2, 11);
        move_by_test_add (data, TRUE);
 
        return e_test_server_utils_run ();
diff --git a/tests/libedata-book/test-sqlite-cursor-posix-initial.c 
b/tests/libedata-book/test-sqlite-cursor-posix-initial.c
index e7c234f..0703fa1 100644
--- a/tests/libedata-book/test-sqlite-cursor-posix-initial.c
+++ b/tests/libedata-book/test-sqlite-cursor-posix-initial.c
@@ -25,9 +25,9 @@ main (gint argc,
         */
        data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Initial", "POSIX");
        move_by_test_add_assertion (data, 5, 11, 2,  6,  3,  8);
-       move_by_test_add_assertion (data, 5, 10, 19, 20, 1,  5);
-       move_by_test_add_assertion (data, 5, 4,  7,  15, 17, 16);
-       move_by_test_add_assertion (data, 5, 18, 14, 12, 13, 9);
+       move_by_test_add_assertion (data, 5, 1,  5,  4,  7,  15);
+       move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
+       move_by_test_add_assertion (data, 5, 12, 13, 9,  19, 20);
        move_by_test_add (data, FALSE);
 
        /* On this case, we want to delete the work directory and start afresh */
diff --git a/tests/libedata-book/test-sqlite-cursor-posix-migrated.c 
b/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
index 632a593..31a5cb9 100644
--- a/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
+++ b/tests/libedata-book/test-sqlite-cursor-posix-migrated.c
@@ -22,9 +22,9 @@ main (gint argc,
 
        data = move_by_test_new ("/EbSdbCursor/Locale/POSIX/Migrated", "POSIX");
        move_by_test_add_assertion (data, 5, 11, 2,  6,  3,  8);
-       move_by_test_add_assertion (data, 5, 10, 19, 20, 1,  5);
-       move_by_test_add_assertion (data, 5, 4,  7,  15, 17, 16);
-       move_by_test_add_assertion (data, 5, 18, 14, 12, 13, 9);
+       move_by_test_add_assertion (data, 5, 1,  5,  4,  7,  15);
+       move_by_test_add_assertion (data, 5, 17, 16, 18, 10, 14);
+       move_by_test_add_assertion (data, 5, 12, 13, 9,  19, 20);
        move_by_test_add (data, FALSE);
 
        /* On this case, we are using the migrated addressbook, don't delete it first */


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