mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add test for sprintf with Infinity and NaN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7e3e79d083
commit
9b40cdfe8c
1 changed files with 4 additions and 0 deletions
|
@ -202,6 +202,10 @@ class TestSprintf < Test::Unit::TestCase
|
|||
assert_equal("0x1p+10", sprintf("%a", 1024))
|
||||
assert_equal("0x1.23456p+789", sprintf("%a", 3.704450999893983e+237))
|
||||
assert_equal("0x1p-1074", sprintf("%a", 4.9e-324))
|
||||
assert_equal("Inf", sprintf("%e", Float::INFINITY))
|
||||
assert_equal("Inf", sprintf("%E", Float::INFINITY))
|
||||
assert_equal("NaN", sprintf("%e", Float::NAN))
|
||||
assert_equal("NaN", sprintf("%E", Float::NAN))
|
||||
end
|
||||
|
||||
BSIZ = 120
|
||||
|
|
Loading…
Reference in a new issue