Avoid using infinite binary floating point numbers in tests.

parent 63b8f5cf
...@@ -214,12 +214,12 @@ assert('Float#to_s') do ...@@ -214,12 +214,12 @@ assert('Float#to_s') do
assert_equal("NaN", Float::NAN.to_s) assert_equal("NaN", Float::NAN.to_s)
assert_equal("0.0", 0.0.to_s) assert_equal("0.0", 0.0.to_s)
assert_equal("-0.0", -0.0.to_s) assert_equal("-0.0", -0.0.to_s)
assert_equal("-3.21", -3.21.to_s) assert_equal("-3.25", -3.25.to_s)
assert_equal("50.0", 50.0.to_s) assert_equal("50.0", 50.0.to_s)
assert_equal("0.00021", 0.00021.to_s) assert_equal("0.00025", 0.00025.to_s)
assert_equal("-0.00021", -0.00021.to_s) assert_equal("-0.00025", -0.00025.to_s)
assert_equal("2.1e-05", 0.000021.to_s) assert_equal("2.5e-05", 0.000025.to_s)
assert_equal("-2.1e-05", -0.000021.to_s) assert_equal("-2.5e-05", -0.000025.to_s)
assert_equal("1.0e+20", 1e20.to_s) assert_equal("1.0e+20", 1e20.to_s)
assert_equal("-1.0e+20", -1e20.to_s) assert_equal("-1.0e+20", -1e20.to_s)
assert_equal("1.0e+16", 10000000000000000.0.to_s) assert_equal("1.0e+16", 10000000000000000.0.to_s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment