diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-25 00:09:44 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-25 00:09:44 +0000 |
commit | aa1369b82178cbee992bec458b4cd9791d5566b8 (patch) | |
tree | d3ecf1525e83532178f68304997eed9d9ae27775 /test/ruby | |
parent | 703de7c213c1f4b85e0dca2bfcbcac2871dfa886 (diff) | |
download | ruby-aa1369b82178cbee992bec458b4cd9791d5566b8.tar.gz |
test/ruby/test_iseq.rb: Skip test_safe_call_chain if Coverage is running.
Follow up to r59990.
When Coverage is running, trace2 instructions are inserted
to take branch coverages for safe method invocations.
This insertion makes safe call chains unable to be optimized
and breaks this test case.
So we test it only when Coverage is not running.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_iseq.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 54256816cf..4de2aa7169 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -186,12 +186,14 @@ class TestISeq < Test::Unit::TestCase assert_predicate(s4, :frozen?) end + # Safe call chain is not optimized when Coverage is running. + # So we can test it only when Coverage is not running. def test_safe_call_chain src = "a&.a&.a&.a&.a&.a" body = compile(src, __LINE__, {peephole_optimization: true}).to_a[13] labels = body.select {|op, arg| op == :branchnil}.map {|op, arg| arg} assert_equal(1, labels.uniq.size) - end + end if (!defined?(Coverage) || !Coverage.running?) def test_parent_iseq_mark assert_separately([], <<-'end;', timeout: 20) |