[Groonga-commit] groonga/groonga [master] [suggest][test] add a test for correct by cooccurrence.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 8月 9日 (火) 11:21:22 JST


Kouhei Sutou	2011-08-09 02:21:22 +0000 (Tue, 09 Aug 2011)

  New Revision: ac39a905c6f0e6d6d4bdbdbfc3bdd2f319f23ffe

  Log:
    [suggest][test] add a test for correct by cooccurrence.

  Modified files:
    test/unit/story/test-rurema.c

  Modified: test/unit/story/test-rurema.c (+19 -0)
===================================================================
--- test/unit/story/test-rurema.c    2011-08-09 02:17:22 +0000 (b60e5b7)
+++ test/unit/story/test-rurema.c    2011-08-09 02:21:22 +0000 (0480ebe)
@@ -22,6 +22,7 @@
 #include "../lib/grn-assertions.h"
 
 void test_complete_cooccurrence(void);
+void test_correct_cooccurrence(void);
 
 static gchar *tmp_directory;
 
@@ -102,3 +103,21 @@ test_complete_coocurrence(void)
         "--threshold 0 "
         "--query 'stりん'"));
 }
+
+void
+test_correct_coocurrence(void)
+{
+  cut_assert_equal_string(
+    "{\"correct\":"
+     "[[1],"
+      "[[\"_key\",\"ShortText\"],"
+       "[\"_score\",\"Int32\"]],"
+      "[\"sum\",1]]}",
+    send_command(
+        "suggest "
+        "--table item_rurema "
+        "--column kana "
+        "--types correct "
+        "--threshold 0 "
+        "--query 'avg'"));
+}




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