Fix test-all tests to avoid creating report_on_exception warnings

* The warnings are shown by Thread.report_on_exception defaulting to
  true. [Feature #14143] [ruby-core:83979]
* Improves tests by narrowing down the scope where an exception
  is expected.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eregon 2017-12-12 18:44:49 +00:00
parent 967eab83e3
commit 15689ed778
19 changed files with 181 additions and 148 deletions

View file

@ -183,12 +183,12 @@ class TestException < Test::Unit::TestCase
def test_throw_false
bug12743 = '[ruby-core:77229] [Bug #12743]'
e = assert_raise_with_message(UncaughtThrowError, /false/, bug12743) {
Thread.start {
Thread.start {
e = assert_raise_with_message(UncaughtThrowError, /false/, bug12743) {
throw false
}.join
}
assert_same(false, e.tag, bug12743)
}
assert_same(false, e.tag, bug12743)
}.join
end
def test_else_no_exception