[Groonga-commit] groonga/groonga [master] add a test for compare operation against reference column. #776

Back to archive index

null+****@clear***** null+****@clear*****
2010年 12月 15日 (水) 09:18:04 JST


Kouhei Sutou	2010-12-15 00:18:04 +0000 (Wed, 15 Dec 2010)

  New Revision: da901ec5ee6a1dfbbcdd639e1d9d1648e263ba30

  Log:
    add a test for compare operation against reference column. #776

  Modified files:
    test/unit/core/test-command-select-query.c

  Modified: test/unit/core/test-command-select-query.c (+19 -0)
===================================================================
--- test/unit/core/test-command-select-query.c    2010-12-14 17:31:36 +0000 (a0dbc3b)
+++ test/unit/core/test-command-select-query.c    2010-12-15 00:18:04 +0000 (e8b7590)
@@ -25,6 +25,7 @@
 
 void test_int64_compare_over_int32(void);
 void test_int64_compare_float_literal(void);
+void test_int32_key_table_reference_compare(void);
 
 static gchar *tmp_directory;
 
@@ -109,3 +110,21 @@ test_int64_compare_float_literal(void)
        "[1,344494643000000]]]",
     send_command("select Integers --query int64:<=3.44494643e14"));
 }
+
+void
+test_int32_key_table_reference_compare(void)
+{
+  assert_send_command("table_create Users TABLE_NO_KEY");
+  assert_send_command("table_create IDs TABLE_HASH_KEY Int32");
+  assert_send_command("column_create Users id COLUMN_SCALAR IDs");
+  assert_send_command("load --table Users\n"
+                      "[\n"
+                      "{\"id\":29}\n"
+                      "]");
+  cut_assert_equal_string(
+      "[[[1],"
+       "[[\"_id\",\"UInt32\"],[\"id\",\"IDs\"]],"
+       "[1,29]]]",
+    send_command("select Users --query id:<30"));
+}
+




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