[Groonga-commit] groonga/groonga at 7d45fba [master] test: migrate to grntest

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Nov 11 14:09:32 JST 2014


Kouhei Sutou	2014-11-11 14:09:32 +0900 (Tue, 11 Nov 2014)

  New Revision: 7d45fba2d2d8283497df21ad5ad5b59399421c62
  https://github.com/groonga/groonga/commit/7d45fba2d2d8283497df21ad5ad5b59399421c62

  Message:
    test: migrate to grntest

  Added files:
    test/command/suite/select/query/less/reference.expected
    test/command/suite/select/query/less/reference.test
  Modified files:
    test/unit/core/test-command-select-query.c

  Added: test/command/suite/select/query/less/reference.expected (+46 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/less/reference.expected    2014-11-11 14:09:32 +0900 (4a450a0)
@@ -0,0 +1,46 @@
+table_create Ages TABLE_PAT_KEY UInt8
+[[0,0.0,0.0],true]
+table_create Users TABLE_PAT_KEY ShortText
+[[0,0.0,0.0],true]
+column_create Users age COLUMN_SCALAR Ages
+[[0,0.0,0.0],true]
+load --table Users
+[
+{"_key": "alice", "age": 22},
+{"_key": "bob",   "age": 21}
+]
+[[0,0.0,0.0],2]
+select Users --query age:<22
+[
+  [
+    0,
+    0.0,
+    0.0
+  ],
+  [
+    [
+      [
+        1
+      ],
+      [
+        [
+          "_id",
+          "UInt32"
+        ],
+        [
+          "_key",
+          "ShortText"
+        ],
+        [
+          "age",
+          "Ages"
+        ]
+      ],
+      [
+        2,
+        "bob",
+        21
+      ]
+    ]
+  ]
+]

  Added: test/command/suite/select/query/less/reference.test (+12 -0) 100644
===================================================================
--- /dev/null
+++ test/command/suite/select/query/less/reference.test    2014-11-11 14:09:32 +0900 (827b8a0)
@@ -0,0 +1,12 @@
+table_create Ages TABLE_PAT_KEY UInt8
+
+table_create Users TABLE_PAT_KEY ShortText
+column_create Users age COLUMN_SCALAR Ages
+
+load --table Users
+[
+{"_key": "alice", "age": 22},
+{"_key": "bob",   "age": 21}
+]
+
+select Users --query age:<22

  Modified: test/unit/core/test-command-select-query.c (+0 -18)
===================================================================
--- test/unit/core/test-command-select-query.c    2014-11-11 14:06:51 +0900 (dbe530d)
+++ test/unit/core/test-command-select-query.c    2014-11-11 14:09:32 +0900 (0a49fa8)
@@ -25,7 +25,6 @@
 
 void test_int64_compare_over_int32(void);
 void test_int64_compare_float_literal(void);
-void test_int32_key_table_reference_compare(void);
 void test_prefix_search(void);
 void test_full_width_space(void);
 void test_leading_plus(void);
@@ -116,23 +115,6 @@ test_int64_compare_float_literal(void)
 }
 
 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"));
-}
-
-void
 test_prefix_search(void)
 {
   assert_send_command("table_create Users TABLE_PAT_KEY ShortText");
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index