Kouhei Sutou
null+****@clear*****
Tue Jun 12 17:21:30 JST 2018
Kouhei Sutou 2018-06-12 17:21:30 +0900 (Tue, 12 Jun 2018) New Revision: 47a7c4ab45203a3f6c865072306d70acbe0fdfae https://github.com/groonga/groonga-query-log/commit/47a7c4ab45203a3f6c865072306d70acbe0fdfae Message: test: extract common code Modified files: test/test-response-comparer.rb Modified: test/test-response-comparer.rb (+8 -10) =================================================================== --- test/test-response-comparer.rb 2018-06-12 17:20:00 +0900 (36004bf) +++ test/test-response-comparer.rb 2018-06-12 17:21:30 +0900 (32eb0a9) @@ -307,21 +307,19 @@ class ResponseComparerTest < Test::Unit::TestCase end class CareDifferencesInAccuracyOfPosition < self - def test_different_accurancy_of_postion - response1 = [ + def create_response(value) + [ [ [1], [["_id", "UInt32"], ["location", "float"]], - [1, 139.763570507358], + [1, value], ] ] - response2 = [ - [ - [1], - [["_id", "UInt32"], ["location", "float"]], - [1, 139.7635705073576], - ], - ] + end + + def test_different_accurancy_of_postion + response1 = create_response(139.763570507358) + response2 = create_response(139.7635705073576) assert do same?(response1, response2, :care_order => false) end -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180612/1fecce6d/attachment.htm