diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-15 13:24:39 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-03-15 15:25:43 +0900 |
| commit | 298807fa4e6550958de9cd77e1fa12dfd9a399e4 (patch) | |
| tree | 59a962c06d7d1d64a0e961b1ca7e6df4eb46d590 | |
| parent | 63b8f5cf5762dba08812210809fbf8e82c0aa7ab (diff) | |
| download | mruby-298807fa4e6550958de9cd77e1fa12dfd9a399e4.tar.gz mruby-298807fa4e6550958de9cd77e1fa12dfd9a399e4.zip | |
Avoid using infinite binary floating point numbers in tests.
| -rw-r--r-- | test/t/float.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/t/float.rb b/test/t/float.rb index eac5c5792..c137698d3 100644 --- a/test/t/float.rb +++ b/test/t/float.rb @@ -214,12 +214,12 @@ assert('Float#to_s') do 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("-3.21", -3.21.to_s) + assert_equal("-3.25", -3.25.to_s) assert_equal("50.0", 50.0.to_s) - assert_equal("0.00021", 0.00021.to_s) - assert_equal("-0.00021", -0.00021.to_s) - assert_equal("2.1e-05", 0.000021.to_s) - assert_equal("-2.1e-05", -0.000021.to_s) + assert_equal("0.00025", 0.00025.to_s) + assert_equal("-0.00025", -0.00025.to_s) + assert_equal("2.5e-05", 0.000025.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+16", 10000000000000000.0.to_s) |
