YUKI Hiroshi
null+****@clear*****
Thu Apr 30 16:58:21 JST 2015
YUKI Hiroshi 2015-04-30 16:58:21 +0900 (Thu, 30 Apr 2015) New Revision: 3ac4133c481ed44c67cdc5ccb826f82ff2122f05 https://github.com/droonga/droonga-engine/commit/3ac4133c481ed44c67cdc5ccb826f82ff2122f05 Message: Separate test groups for Reducer more meaningfully Modified files: test/unit/test_reducer.rb Modified: test/unit/test_reducer.rb (+7 -12) =================================================================== --- test/unit/test_reducer.rb 2015-04-30 16:41:45 +0900 (a74abe0) +++ test/unit/test_reducer.rb 2015-04-30 16:58:21 +0900 (abcc166) @@ -21,18 +21,17 @@ class ReducerTest < Test::Unit::TestCase columns end + def reduce_value(deal, left_value, right_value) + reducer = Droonga::Reducer.new(deal) + reducer.reduce(left_value, right_value) + end + class << self def create_record(*columns) columns end end - class ReduceRecordsTest < self - def reduce_value(deal, left_value, right_value) - reducer = Droonga::Reducer.new(deal) - reducer.reduce(left_value, right_value) - end - data( :int => { :expected => 1.5, @@ -110,6 +109,7 @@ class ReducerTest < Test::Unit::TestCase assert_equal(data[:expected], reduced) end + class ReduceRecords < self data( :numeric_values => { :expected => 3, @@ -295,12 +295,7 @@ class ReducerTest < Test::Unit::TestCase end end - class MergeRecordsTest < self - def reduce_value(deal, left_value, right_value) - reducer = Droonga::Reducer.new(deal) - reducer.reduce(left_value, right_value) - end - + class MergeRecords < self def test_grouped expected = [ [ -------------- next part -------------- HTML����������������������������... Télécharger