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 | 04383f8347519cc6f5566c998dfa83981c30d0a5 (patch) | |
tree | 2f88ffe47f8d420ddff88448fe851b2c9413380f /test/ruby/test_bignum.rb | |
parent | 644f2eeca5392124264a0839e9f8500d700685c0 (diff) | |
download | ruby-04383f8347519cc6f5566c998dfa83981c30d0a5.tar.gz ruby-04383f8347519cc6f5566c998dfa83981c30d0a5.tar.xz ruby-04383f8347519cc6f5566c998dfa83981c30d0a5.zip |
* 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: http://svn.ruby-lang.org/repos/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 a08519238..2d9008ecc 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 |