diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-10 21:52:25 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-10 21:52:25 +0000 |
commit | 65753a5838bf32db668ef29a52dc801c306384ee (patch) | |
tree | 2f88ffe47f8d420ddff88448fe851b2c9413380f /test/ruby/test_bignum.rb | |
parent | a336e6ebd12cde09855b13fc8de1644de5bfc3ad (diff) | |
download | ruby-65753a5838bf32db668ef29a52dc801c306384ee.tar.gz |
* test/ruby/test_pack.rb: fix tests for 64bit CPU.
* test/ruby/test_bignum.rb: ditto.
* test/ruby/test_file_exhaustive.rb: ditto.
* test/ruby/test_integer.rb: ditto.
* test/ruby/test_time.rb: ditto.
* test/ruby/test_numeric.rb: ditto.
* test/ruby/test_fixnum.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_bignum.rb')
-rw-r--r-- | test/ruby/test_bignum.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index a08519238b..2d9008ecce 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -196,9 +196,18 @@ class TestBignum < Test::Unit::TestCase assert_equal([255], [T_MONE].pack("C").unpack("C")) assert_equal([0], [T32].pack("C").unpack("C")) assert_raise(RangeError) { 0.to_s(T32) } - assert_raise(Errno::EINVAL) { Process.wait(0, T32P) } - assert_raise(RangeError) { Process.wait(0, T32) } - assert_raise(RangeError) { Process.wait(0, -T32P) } + assert_raise(Errno::EINVAL) do + begin Process.wait(0, T32P); rescue Errno::ECHILD; end + begin Process.wait(0, T64P); rescue Errno::ECHILD; end + end + assert_raise(RangeError) do + begin Process.wait(0, T32); rescue Errno::ECHILD; end + begin Process.wait(0, T64); rescue Errno::ECHILD; end + end + assert_raise(RangeError) do + begin Process.wait(0, -T32P); rescue Errno::ECHILD; end + begin Process.wait(0, -T64P); rescue Errno::ECHILD; end + end end def test_sub |