1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Suppress warning: Bignum out of Float range

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-11-07 07:03:53 +00:00
parent 172d8f9b6e
commit a3286ba320

View file

@ -155,10 +155,12 @@ class TestFloat < Test::Unit::TestCase
assert_equal(31.0*2**1019, Float("0x0."+("0"*600)+"1fp3427"))
assert_equal(-31.0*2**1019, Float("-0x0."+("0"*268)+"1fp2099"))
assert_equal(-31.0*2**1019, Float("-0x0."+("0"*600)+"1fp3427"))
assert_equal(31.0*2**-1027, Float("0x1f"+("0"*268)+".0p-2099"))
assert_equal(31.0*2**-1027, Float("0x1f"+("0"*600)+".0p-3427"))
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*268)+".0p-2099"))
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427"))
suppress_warning do
assert_equal(31.0*2**-1027, Float("0x1f"+("0"*268)+".0p-2099"))
assert_equal(31.0*2**-1027, Float("0x1f"+("0"*600)+".0p-3427"))
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*268)+".0p-2099"))
assert_equal(-31.0*2**-1027, Float("-0x1f"+("0"*600)+".0p-3427"))
end
end
def test_divmod