mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/ruby/test_float.rb: added test_strtod to test Float("0").
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c61c44fba
commit
0603e040b2
2 changed files with 16 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Sun May 9 23:34:51 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
|
||||
|
||||
* test/ruby/test_float.rb: added test_strtod to test Float("0").
|
||||
|
||||
Sun May 9 13:24:24 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||
|
||||
* lib/yaml/store.rb: use FileUtils::copy.
|
||||
|
|
|
@ -51,4 +51,16 @@ class TestFloat < Test::Unit::TestCase
|
|||
b = 100000000000000000000000.0
|
||||
assert_equal(a == b, b == a)
|
||||
end
|
||||
|
||||
def test_strtod
|
||||
a = Float("0")
|
||||
assert(a.abs < Float::EPSILON)
|
||||
a = Float("0.0")
|
||||
assert(a.abs < Float::EPSILON)
|
||||
a = Float("+0.0")
|
||||
assert(a.abs < Float::EPSILON)
|
||||
a = Float("-0.0")
|
||||
assert(a.abs < Float::EPSILON)
|
||||
# add expected behaviour here.
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue