1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_jit.rb: skip some tests

that don't succeed on MinGW after r64929

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-10-07 05:54:04 +00:00
parent f13a2ad6df
commit 2cacb2d0be

View file

@ -78,6 +78,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_blockparam
skip_on_mingw
skip_on_mswin
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '3', success_count: 2, insns: %i[getblockparam setblockparam])
begin;
@ -167,10 +168,8 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_putspecialobject_putiseq
skip_on_mingw # [Bug #14948]
skip_on_mswin
if /mingw/ =~ RUBY_PLATFORM
skip "this is currently failing on MinGW [Bug #14948]"
end
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: 'hellohello', success_count: 2, insns: %i[putspecialobject putiseq])
begin;
@ -184,6 +183,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_putstring_concatstrings_tostring
skip_on_mingw
skip_on_mswin
assert_compile_once('"a#{}b" + "c"', result_inspect: '"abc"', insns: %i[putstring concatstrings tostring])
end
@ -211,6 +211,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_intern_duparray
skip_on_mingw
skip_on_mswin
assert_compile_once('[:"#{0}"] + [1,2,3]', result_inspect: '[:"0", 1, 2, 3]', insns: %i[intern duparray])
end
@ -357,6 +358,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_invokesuper
skip_on_mingw
skip_on_mswin
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '3', success_count: 4, insns: %i[invokesuper])
begin;
@ -376,6 +378,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_invokeblock_leave
skip_on_mingw
skip_on_mswin
assert_eval_with_jit("#{<<~"begin;"}\n#{<<~"end;"}", stdout: '2', success_count: 2, insns: %i[invokeblock leave])
begin;
@ -446,6 +449,7 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_once
skip_on_mingw
skip_on_mswin
assert_compile_once('/#{true}/o =~ "true" && $~.to_a', result_inspect: '["true"]', insns: %i[once])
end
@ -517,11 +521,13 @@ class TestJIT < Test::Unit::TestCase
end
def test_compile_insn_opt_aref_with
skip_on_mingw
skip_on_mswin
assert_compile_once("{ '1' => 2 }['1']", result_inspect: '2', insns: %i[opt_aref_with])
end
def test_compile_insn_opt_aset
skip_on_mingw
skip_on_mswin
assert_compile_once("#{<<~"begin;"}\n#{<<~"end;"}", result_inspect: '5', insns: %i[opt_aset opt_aset_with])
begin;
@ -833,6 +839,12 @@ class TestJIT < Test::Unit::TestCase
end
end
def skip_on_mingw
if RUBY_PLATFORM.match?(/mingw/)
skip 'This test does not succeed on mingw yet.'
end
end
# The shortest way to test one proc
def assert_compile_once(script, result_inspect:, insns: [])
if script.match?(/\A\n.+\n\z/m)