Commit 2a661ac6 authored by Syohei YOSHIDA's avatar Syohei YOSHIDA

Add tests which passes all zero string to Kernel#Integer

parent 49248569
...@@ -22,6 +22,8 @@ assert('Kernel#Integer') do ...@@ -22,6 +22,8 @@ assert('Kernel#Integer') do
assert_equal(26, Integer("0x1a")) assert_equal(26, Integer("0x1a"))
assert_equal(930, Integer("0930", 10)) assert_equal(930, Integer("0930", 10))
assert_equal(7, Integer("111", 2)) assert_equal(7, Integer("111", 2))
assert_equal(0, Integer("0"))
assert_equal(0, Integer("00000"))
assert_raise(TypeError) { Integer(nil) } assert_raise(TypeError) { Integer(nil) }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment