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: add tests. [ruby-dev:35009]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2008-06-10 12:08:45 +00:00
parent e585bc3c2f
commit 8b7a284b65
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Tue Jun 10 21:07:19 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/ruby/test_float.rb: add tests. [ruby-dev:35009]
Tue Jun 10 20:55:57 2008 Tadayoshi Funaba <tadf@dotrb.org>
* complex.c (nucomp_s_convert): need not to initialize optional

View file

@ -75,6 +75,9 @@ class TestFloat < Test::Unit::TestCase
assert(a.abs < Float::EPSILON)
a = Float("-.0")
assert(a.abs < Float::EPSILON)
assert_raise(ArgumentError){Float("0.")}
assert_raise(ArgumentError){Float("+0.")}
assert_raise(ArgumentError){Float("-0.")}
assert_raise(ArgumentError){Float(".")}
assert_raise(ArgumentError){Float("+")}
assert_raise(ArgumentError){Float("+.")}