[Groonga-commit] groonga/groonga [master] add tests for GRN_CURSOR_RK with offset and limit.

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2010年 8月 18日 (水) 10:40:39 JST


Kouhei Sutou	2010-08-18 01:40:39 +0000 (Wed, 18 Aug 2010)

  New Revision: 52734011006e22cd92f61f76717e0018aef43885

  Log:
    add tests for GRN_CURSOR_RK with offset and limit.

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

  Modified: test/unit/core/test-table-patricia-trie-cursor.c (+34 -0)
===================================================================
--- test/unit/core/test-table-patricia-trie-cursor.c    2010-08-18 01:28:57 +0000 (a4d1a11)
+++ test/unit/core/test-table-patricia-trie-cursor.c    2010-08-18 01:40:39 +0000 (92819ee)
@@ -753,12 +753,46 @@ data_prefix_rk_xyu(void)
            0, -1);
 }
 
+static void
+data_prefix_rk_offset_and_limit(void)
+{
+  ADD_DATA("offset",
+           gcut_list_string_new("キノウ",
+                                "キョウカ",
+                                "クミコミ",
+                                "クミコム",
+                                "ケンサクヨウキュウ",
+                                "コウセイド",
+                                "コウソク",
+                                "コンパクト",
+                                NULL),
+           "k",
+           3, -1);
+  ADD_DATA("limit",
+           gcut_list_string_new("カネソナエタ",
+                                "カノウ",
+                                "ケンサク",
+                                NULL),
+           "k",
+           0, 3);
+  ADD_DATA("offset - limit",
+           gcut_list_string_new("キノウ",
+                                "キョウカ",
+                                "ケンサクヨウキュウ",
+                                "コウセイド",
+                                "コウソク",
+                                NULL),
+           "k",
+           3, 5);
+}
+
 void
 data_prefix_rk(void)
 {
   data_prefix_rk_basic();
   data_prefix_rk_xtsu();
   data_prefix_rk_xyu();
+  data_prefix_rk_offset_and_limit();
 }
 #undef ADD_DATA
 




Groonga-commit メーリングリストの案内
アーカイブの一覧に戻る