Commit d1e755df authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1984 from mattn/test_hex_oct_underscore

More tests for String#hex, String#oct as against 94345060
parents 3eb3c99a ea68fe2f
...@@ -141,6 +141,7 @@ assert('String#hex') do ...@@ -141,6 +141,7 @@ assert('String#hex') do
assert_equal (-16), "-0x10".hex assert_equal (-16), "-0x10".hex
assert_equal 0, "xyz".hex assert_equal 0, "xyz".hex
assert_equal 16, "10z".hex assert_equal 16, "10z".hex
assert_equal 16, "1_0".hex
assert_equal 0, "".hex assert_equal 0, "".hex
end end
...@@ -151,6 +152,7 @@ assert('String#oct') do ...@@ -151,6 +152,7 @@ assert('String#oct') do
assert_equal 0, "9".oct assert_equal 0, "9".oct
assert_equal 0, "xyz".oct assert_equal 0, "xyz".oct
assert_equal 8, "10z".oct assert_equal 8, "10z".oct
assert_equal 8, "1_0".oct
assert_equal 8, "010".oct assert_equal 8, "010".oct
assert_equal (-8), "-10".oct assert_equal (-8), "-10".oct
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