1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add assertions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-07-30 03:45:05 +00:00
parent 148e522f63
commit 8721f3983d

View file

@ -109,7 +109,8 @@ class TestInteger < Test::Unit::TestCase
}
VS.each {|a|
VS.each {|b|
c = a[b]
c = nil
assert_nothing_raised("(#{a})[#{b}]") { c = a[b] }
if b < 0
assert_equal(0, c, "(#{a})[#{b}]")
else
@ -445,5 +446,6 @@ class TestInteger < Test::Unit::TestCase
assert_raise(ArgumentError) { Integer("4611686018427387904_") }
assert_raise(ArgumentError) { Integer("4611686018427387904 :") }
assert_equal(0x4000000000000000, Integer("46_11_686_0184273_87904"))
assert_raise(ArgumentError) { Integer("\0") }
end
end