diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-07 07:03:53 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-07 07:03:53 +0000 |
commit | a3286ba320deabfd60861eabaddbc0263cb429f8 (patch) | |
tree | 8b269ced91ef4c389503bdb636340a36bff16445 /test | |
parent | 172d8f9b6eb3d0af7f451e505fd3a5c2e438215e (diff) | |
download | ruby-a3286ba320deabfd60861eabaddbc0263cb429f8.tar.gz |
Suppress warning: Bignum out of Float range
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_float.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 288101f129..f011c2b062 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -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 |