mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add invalid hexadecimal float tests
This commit is contained in:
parent
560941e711
commit
0cc989696e
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ class TestFloat < Test::Unit::TestCase
|
|||
assert_raise(ArgumentError){Float("1__1")}
|
||||
assert_raise(ArgumentError){Float("1.")}
|
||||
assert_raise(ArgumentError){Float("1.e+00")}
|
||||
assert_raise(ArgumentError){Float("0x.1")}
|
||||
assert_raise(ArgumentError){Float("0x1.")}
|
||||
assert_raise(ArgumentError){Float("0x1.0")}
|
||||
assert_raise(ArgumentError){Float("0x1.p+0")}
|
||||
# add expected behaviour here.
|
||||
assert_equal(10, Float("1_0"))
|
||||
|
|
Loading…
Add table
Reference in a new issue