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

* test/ruby/test_float.rb (test_float): test literal, not sprintf.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2007-12-22 03:15:36 +00:00
parent 85143195da
commit 3ce6e61a7b

View file

@ -11,6 +11,8 @@ class TestFloat < Test::Unit::TestCase
assert_equal(3, 2.6.round)
assert_equal(-2, (-2.4).truncate)
assert((13.4 % 1 - 0.4).abs < 0.0001)
assert_equal(36893488147419111424,
36893488147419107329.0.to_i)
assert_equal("36893488147419111424",
sprintf("%20.0f", 36893488147419107329.0))
end