[Groonga-commit] groonga/groonga-query-log at 10def08 [master] response-comparer: need more loose normalization

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jun 18 11:48:24 JST 2018


Kouhei Sutou	2018-06-18 11:48:24 +0900 (Mon, 18 Jun 2018)

  New Revision: 10def08e2a6dcd9667ee5bb664186794d5920f4e
  https://github.com/groonga/groonga-query-log/commit/10def08e2a6dcd9667ee5bb664186794d5920f4e

  Message:
    response-comparer: need more loose normalization

  Modified files:
    lib/groonga-query-log/response-comparer.rb
    test/test-response-comparer.rb

  Modified: lib/groonga-query-log/response-comparer.rb (+1 -1)
===================================================================
--- lib/groonga-query-log/response-comparer.rb    2018-06-13 17:23:29 +0900 (7713ac0)
+++ lib/groonga-query-log/response-comparer.rb    2018-06-18 11:48:24 +0900 (fe44f66)
@@ -271,7 +271,7 @@ module GroongaQueryLog
       type = column[1]
       case type
       when "Float"
-        value.round(12)
+        value.round(10)
       else
         value
       end

  Modified: test/test-response-comparer.rb (+6 -6)
===================================================================
--- test/test-response-comparer.rb    2018-06-13 17:23:29 +0900 (9c2fb61)
+++ test/test-response-comparer.rb    2018-06-18 11:48:24 +0900 (aa14b7b)
@@ -337,8 +337,8 @@ class ResponseComparerTest < Test::Unit::TestCase
       end
 
       def test_all_output_columns
-        response1 = create_response(35.6562002690605,  139.763570507358)
-        response2 = create_response(35.65620026906051, 139.7635705073576)
+        response1 = create_response(35.6705996342355,  139.683422370535)
+        response2 = create_response(35.67059963423547, 139.6834223705349)
         assert do
           same?(response1, response2)
         end
@@ -346,8 +346,8 @@ class ResponseComparerTest < Test::Unit::TestCase
 
       def test_unary_minus_output_column
         @command["output_columns"] = "_id, -value, latitude, longitude"
-        response1 = create_response(35.6562002690605,  139.763570507358)
-        response2 = create_response(35.65620026906051, 139.7635705073576)
+        response1 = create_response(35.6705996342355,  139.683422370535)
+        response2 = create_response(35.67059963423547, 139.6834223705349)
         assert do
           same?(response1, response2)
         end
@@ -355,8 +355,8 @@ class ResponseComparerTest < Test::Unit::TestCase
 
       def test_specific_output_columns
         @command["output_columns"] = "_id, latitude, longitude"
-        response1 = create_response(35.6562002690605,  139.763570507358)
-        response2 = create_response(35.65620026906051, 139.7635705073576)
+        response1 = create_response(35.6705996342355,  139.683422370535)
+        response2 = create_response(35.67059963423547, 139.6834223705349)
         assert do
           same?(response1, response2)
         end
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180618/302e1ae3/attachment-0001.htm 



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