summaryrefslogtreecommitdiff
path: root/test/coverage/test_coverage.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-25 19:13:26 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-25 19:13:26 +0000
commit8a66d135353ac78c70a28ac1e8117a5f9134072a (patch)
treea9abefeb44c530dab459834acc9ddca96c3f94be /test/coverage/test_coverage.rb
parent301d669a3150762c51473fde9c486169241e2ec0 (diff)
suppress_warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/coverage/test_coverage.rb')
-rw-r--r--test/coverage/test_coverage.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/coverage/test_coverage.rb b/test/coverage/test_coverage.rb
index 0fa8f9b..b039213 100644
--- a/test/coverage/test_coverage.rb
+++ b/test/coverage/test_coverage.rb
@@ -2,6 +2,7 @@
require "test/unit"
require "coverage"
require "tmpdir"
+require "envutil"
class TestCoverage < Test::Unit::TestCase
def test_result_without_start
@@ -114,8 +115,10 @@ class TestCoverage < Test::Unit::TestCase
def test_nonpositive_linenumber
bug12517 = '[ruby-core:76141] [Bug #12517]'
Coverage.start
- assert_nothing_raised(ArgumentError, bug12517) do
- RubyVM::InstructionSequence.compile(":ok", nil, "<compiled>", 0)
+ EnvUtil.suppress_warning do
+ assert_nothing_raised(ArgumentError, bug12517) do
+ RubyVM::InstructionSequence.compile(":ok", nil, "<compiled>", 0)
+ end
end
assert_include Coverage.result, "<compiled>"
end
@@ -142,7 +145,9 @@ class TestCoverage < Test::Unit::TestCase
Coverage.start
require tmp + '/test.rb'
- add_method(Class.new)
+ EnvUtil.suppress_warning do
+ add_method(Class.new)
+ end
assert_equal Coverage.result[tmp + "/test.rb"], [1, 1, 1, 400, nil, nil, nil, nil, nil, nil, nil], bug13305
}
}