[Groonga-commit] droonga/droonga-engine at ee4ccc0 [master] Add more tests for Reducer#sum

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Apr 30 17:04:31 JST 2015


YUKI Hiroshi	2015-04-30 17:04:31 +0900 (Thu, 30 Apr 2015)

  New Revision: ee4ccc0377241fb57f8f5c5b3c832dad9a122ab4
  https://github.com/droonga/droonga-engine/commit/ee4ccc0377241fb57f8f5c5b3c832dad9a122ab4

  Message:
    Add more tests for Reducer#sum

  Modified files:
    test/unit/test_reducer.rb

  Modified: test/unit/test_reducer.rb (+20 -0)
===================================================================
--- test/unit/test_reducer.rb    2015-04-30 17:01:43 +0900 (83179ab)
+++ test/unit/test_reducer.rb    2015-04-30 17:04:31 +0900 (8e476ee)
@@ -58,6 +58,26 @@ class ReducerTest < Test::Unit::TestCase
       :left     => {:a => 0, :c => 2},
       :right    => {:b => 1, :c => 3},
     },
+    :nested_hash => {
+      :expected => {:a => 0, :b => 1, :c => {:d => 2}},
+      :left     => {:a => 0, :c => {:d => 2}},
+      :right    => {:b => 1, :c => {:e => 3}},
+    },
+    :nil_left => {
+      :expected => 0,
+      :left     => nil,
+      :right    => 0,
+    },
+    :nil_right => {
+      :expected => 0,
+      :left     => 0,
+      :right    => nil,
+    },
+    :nil_both => {
+      :expected => nil,
+      :left     => nil,
+      :right    => nil,
+    },
   )
   def test_sum(data)
     reduced = reduce_value({ "type" => "sum" },
-------------- next part --------------
HTML����������������������������...
다운로드 



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