[Groonga-commit] groonga/groonga [master] add tests for grn_table_sort() for geo with offset and limit.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 7月 27日 (火) 09:29:01 JST


Kouhei Sutou	2010-07-27 00:29:01 +0000 (Tue, 27 Jul 2010)

  New Revision: fbee7a13d9900d19db5951e580509d6e2964b503

  Log:
    add tests for grn_table_sort() for geo with offset and limit.

  Modified files:
    test/unit/core/test-table-patricia-trie-sort.c

  Modified: test/unit/core/test-table-patricia-trie-sort.c (+33 -1)
===================================================================
--- test/unit/core/test-table-patricia-trie-sort.c    2010-07-26 08:38:08 +0000 (04487ef)
+++ test/unit/core/test-table-patricia-trie-sort.c    2010-07-27 00:29:01 +0000 (f2d6423)
@@ -198,6 +198,38 @@ data_near_geo(void)
                        0, 0, 0),
            0, -1);
 
+  ADD_DATA("limit",
+           gcut_list_string_new(INSPECTED_POINT(1, 2, 3,
+                                                4, 5, 6),
+                                INSPECTED_POINT(1, 2, 3,
+                                                7, 8, 9),
+                                INSPECTED_POINT(7, 8, 9,
+                                                4, 5, 6),
+                                INSPECTED_POINT(-89, -59, -59,
+                                                1, 2, 3),
+                                INSPECTED_POINT(89, 59, 59,
+                                                -178, -58, -57),
+                                NULL),
+           TAKEN_POINT(0, 0, 0,
+                       0, 0, 0),
+           0, 5);
+
+  ADD_DATA("offset - limit",
+           gcut_list_string_new(INSPECTED_POINT(7, 8, 9,
+                                                4, 5, 6),
+                                INSPECTED_POINT(-89, -59, -59,
+                                                1, 2, 3),
+                                INSPECTED_POINT(89, 59, 59,
+                                                -178, -58, -57),
+                                INSPECTED_POINT(-88, -58, -57,
+                                                -178, -58, -57),
+                                INSPECTED_POINT(88, 58, 58,
+                                                178, 58, 58),
+                                NULL),
+           TAKEN_POINT(0, 0, 0,
+                       0, 0, 0),
+           2, 5);
+
 #undef ADD_DATA
 }
 
@@ -229,7 +261,7 @@ test_near_geo(gpointer data)
                                    TAKEN_POINT(89, 59, 59,
                                                179, 59, 59),
                                    TAKEN_POINT(89, 59, 59,
-                                               -178, -58, -58),
+                                               -178, -58, -57),
                                    TAKEN_POINT(88, 58, 58,
                                                178, 58, 58),
                                    TAKEN_POINT(-89, -59, -59,




Groonga-commit メーリングリストの案内
Back to archive index