diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-02 17:51:45 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-08-02 17:51:45 +0900 |
commit | ee1334189b95cb5e7785e3415b332a7a76879ac3 (patch) | |
tree | 8ddba294028c65730a0d0ba7d5cd1a3f07f9a26f /test/ruby | |
parent | e03b3b4ae046785278b9188c83b2338f0f550526 (diff) | |
download | ruby-ee1334189b95cb5e7785e3415b332a7a76879ac3.tar.gz |
Fix uplevel
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_jit.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 24ab7fc2d1..188c013691 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -951,17 +951,17 @@ class TestJIT < Test::Unit::TestCase private # The shortest way to test one proc - def assert_compile_once(script, result_inspect:, insns: []) + def assert_compile_once(script, result_inspect:, insns: [], uplevel: 1) if script.match?(/\A\n.+\n\z/m) script = script.gsub(/^/, ' ') else script = " #{script} " end - assert_eval_with_jit("p proc {#{script}}.call", stdout: "#{result_inspect}\n", success_count: 1, insns: insns, uplevel: 2) + assert_eval_with_jit("p proc {#{script}}.call", stdout: "#{result_inspect}\n", success_count: 1, insns: insns, uplevel: uplevel + 1) end # Shorthand for normal test cases - def assert_eval_with_jit(script, stdout: nil, success_count:, min_calls: 1, insns: [], uplevel: 3) + def assert_eval_with_jit(script, stdout: nil, success_count:, min_calls: 1, insns: [], uplevel: 1) out, err = eval_with_jit(script, verbose: 1, min_calls: min_calls) actual = err.scan(/^#{JIT_SUCCESS_PREFIX}:/).size # Add --jit-verbose=2 logs for cl.exe because compiler's error message is suppressed @@ -975,7 +975,7 @@ class TestJIT < Test::Unit::TestCase insns.each do |insn| unless used_insns.include?(insn) $stderr.puts - warn "'#{insn}' insn is not included in the script. Actual insns are: #{used_insns.join(' ')}\n", uplevel: uplevel + warn "'#{insn}' insn is not included in the script. Actual insns are: #{used_insns.join(' ')}\n", uplevel: uplevel+2 end TestJIT.untested_insns.delete(insn) end |