* 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
@ -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>
|
Sun May 9 13:24:24 2004 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* lib/yaml/store.rb: use FileUtils::copy.
|
* lib/yaml/store.rb: use FileUtils::copy.
|
||||||
|
@ -51,4 +51,16 @@ class TestFloat < Test::Unit::TestCase
|
|||||||
b = 100000000000000000000000.0
|
b = 100000000000000000000000.0
|
||||||
assert_equal(a == b, b == a)
|
assert_equal(a == b, b == a)
|
||||||
end
|
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
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user