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

add tests for [ruby-dev:31189] and [ruby-dev:31190].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-07-12 13:23:29 +00:00
parent f603c4ae08
commit 8f79c623f3
2 changed files with 12 additions and 0 deletions

View file

@ -23,4 +23,14 @@ class TestFixnum < Test::Unit::TestCase
end
end
end
def test_succ
assert_equal(0x40000000, 0x3fffffff.succ, "[ruby-dev:31189]")
assert_equal(0x4000000000000000, 0x3fffffffffffffff.succ, "[ruby-dev:31190]")
end
def test_plus
assert_equal(0x4000000000000000, 0x3fffffffffffffff+1)
end
end

View file

@ -50,5 +50,7 @@ class TestRange < Test::Unit::TestCase
assert_equal(2.0, (1.0..2.0).max)
assert_equal(nil, (2.0..1.0).max)
assert_raise(TypeError) { (1.0...2.0).max }
assert_equal(-0x80000002, ((-0x80000002)...(-0x80000001)).max)
end
end