summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-09 14:38:11 +0000
committernahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-09 14:38:11 +0000
commit6452c26b9c04f1eb5cf8bd31297f60462d45d182 (patch)
tree0abe254da8d5a51af55cef8f9e2be078c43acbfe
parent6de9e40eacc4f961624b26118b25abbc3191b998 (diff)
downloadruby-6452c26b9c04f1eb5cf8bd31297f60462d45d182.tar.gz
ruby-6452c26b9c04f1eb5cf8bd31297f60462d45d182.tar.xz
ruby-6452c26b9c04f1eb5cf8bd31297f60462d45d182.zip
* test/ruby/test_float.rb: added test_strtod to test Float("0").
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_float.rb12
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6eaa9cff7..d51de34f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb
index 568c56181..6fae9bf49 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