summaryrefslogtreecommitdiff
path: root/test/json
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 15:07:35 +0300
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-06-01 15:07:35 +0300
commit3c77ef9adc567af58e27c62db35d618f3b3069d2 (patch)
treea8e80cdd3d96e566f4ceded1e57984d6d3581a0a /test/json
parent9eecd7a2fd0b67aa13450887a1fee9a6638b9e4e (diff)
Ignore warnings about ambiguous first argument with the negative integer.
Diffstat (limited to 'test/json')
-rw-r--r--test/json/json_parser_test.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/json/json_parser_test.rb b/test/json/json_parser_test.rb
index 68aeb57..9946dd9 100644
--- a/test/json/json_parser_test.rb
+++ b/test/json/json_parser_test.rb
@@ -91,22 +91,22 @@ class JSONParserTest < Test::Unit::TestCase
assert_raise(JSON::ParserError) { parse('+23') }
assert_raise(JSON::ParserError) { parse('.23') }
assert_raise(JSON::ParserError) { parse('023') }
- assert_equal 23, parse('23')
- assert_equal -23, parse('-23')
- assert_equal_float 3.141, parse('3.141')
- assert_equal_float -3.141, parse('-3.141')
- assert_equal_float 3.141, parse('3141e-3')
- assert_equal_float 3.141, parse('3141.1e-3')
- assert_equal_float 3.141, parse('3141E-3')
- assert_equal_float 3.141, parse('3141.0E-3')
- assert_equal_float -3.141, parse('-3141.0e-3')
- assert_equal_float -3.141, parse('-3141e-3')
+ assert_equal(23, parse('23'))
+ assert_equal(-23, parse('-23'))
+ assert_equal_float(3.141, parse('3.141'))
+ assert_equal_float(-3.141, parse('-3.141'))
+ assert_equal_float(3.141, parse('3141e-3'))
+ assert_equal_float(3.141, parse('3141.1e-3'))
+ assert_equal_float(3.141, parse('3141E-3'))
+ assert_equal_float(3.141, parse('3141.0E-3'))
+ assert_equal_float(-3.141, parse('-3141.0e-3'))
+ assert_equal_float(-3.141, parse('-3141e-3'))
assert_raise(ParserError) { parse('NaN') }
assert parse('NaN', :allow_nan => true).nan?
assert_raise(ParserError) { parse('Infinity') }
- assert_equal 1.0/0, parse('Infinity', :allow_nan => true)
+ assert_equal(1.0/0, parse('Infinity', :allow_nan => true))
assert_raise(ParserError) { parse('-Infinity') }
- assert_equal -1.0/0, parse('-Infinity', :allow_nan => true)
+ assert_equal(-1.0/0, parse('-Infinity', :allow_nan => true))
end
def test_parse_bigdecimals