Skip to content

Commit

Permalink
Add invalid hexadecimal float tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Aug 21, 2022
1 parent 560941e commit 0cc9896
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/ruby/test_float.rb
Expand Up @@ -141,6 +141,9 @@ def test_strtod
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"))
Expand Down

0 comments on commit 0cc9896

Please sign in to comment.