mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
suppress_warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
301d669a31
commit
8a66d13535
1 changed files with 8 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
require "test/unit"
|
require "test/unit"
|
||||||
require "coverage"
|
require "coverage"
|
||||||
require "tmpdir"
|
require "tmpdir"
|
||||||
|
require "envutil"
|
||||||
|
|
||||||
class TestCoverage < Test::Unit::TestCase
|
class TestCoverage < Test::Unit::TestCase
|
||||||
def test_result_without_start
|
def test_result_without_start
|
||||||
|
@ -114,8 +115,10 @@ class TestCoverage < Test::Unit::TestCase
|
||||||
def test_nonpositive_linenumber
|
def test_nonpositive_linenumber
|
||||||
bug12517 = '[ruby-core:76141] [Bug #12517]'
|
bug12517 = '[ruby-core:76141] [Bug #12517]'
|
||||||
Coverage.start
|
Coverage.start
|
||||||
assert_nothing_raised(ArgumentError, bug12517) do
|
EnvUtil.suppress_warning do
|
||||||
RubyVM::InstructionSequence.compile(":ok", nil, "<compiled>", 0)
|
assert_nothing_raised(ArgumentError, bug12517) do
|
||||||
|
RubyVM::InstructionSequence.compile(":ok", nil, "<compiled>", 0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
assert_include Coverage.result, "<compiled>"
|
assert_include Coverage.result, "<compiled>"
|
||||||
end
|
end
|
||||||
|
@ -142,7 +145,9 @@ class TestCoverage < Test::Unit::TestCase
|
||||||
|
|
||||||
Coverage.start
|
Coverage.start
|
||||||
require tmp + '/test.rb'
|
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
|
assert_equal Coverage.result[tmp + "/test.rb"], [1, 1, 1, 400, nil, nil, nil, nil, nil, nil, nil], bug13305
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue