diff --git a/ChangeLog b/ChangeLog index 6eaa9cff70..d51de34f05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 9 23:34:51 2004 NAKAMURA, Hiroshi + + * test/ruby/test_float.rb: added test_strtod to test Float("0"). + Sun May 9 13:24:24 2004 WATANABE Hirofumi * lib/yaml/store.rb: use FileUtils::copy. diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index 568c56181a..6fae9bf493 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -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