diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-25 09:03:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-25 09:03:54 +0000 |
commit | f4ac735476535dcc0acbfbc507009fc67ddeaffa (patch) | |
tree | c42d33f362978602c6f0791473c69160ea2abfe1 /test | |
parent | 8e10ee739b2d09ee2deb89980591843c93d9dc97 (diff) | |
download | ruby-f4ac735476535dcc0acbfbc507009fc67ddeaffa.tar.gz |
test_method.rb: refine assertions
* test/ruby/test_method.rb (test_unlinked_method_entry_in_method_object_bug):
use assert_normal_exit since subject code never exit successfully,
but check if timed out paranoically.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_method.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index 167234bb1a..3cfdef5dcd 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -579,14 +579,18 @@ class TestMethod < Test::Unit::TestCase def test_unlinked_method_entry_in_method_object_bug bug8100 = '[ruby-core:53640] [Bug #8100]' - assert_ruby_status [], %q{ + begin + assert_normal_exit %q{ loop do def x "hello" * 1000 end method(:x).call end - }, bug8100, timeout: 2 - rescue Timeout::Error + }, bug8100, timeout: 2 + rescue Timeout::Error => e + else + end + assert_raise(Timeout::Error, bug8100) {raise e if e} end end |