diff options
Diffstat (limited to 'test/ruby/test_yjit_exit_locations.rb')
-rw-r--r-- | test/ruby/test_yjit_exit_locations.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/test/ruby/test_yjit_exit_locations.rb b/test/ruby/test_yjit_exit_locations.rb index 9bafe392d5..816ab457ce 100644 --- a/test/ruby/test_yjit_exit_locations.rb +++ b/test/ruby/test_yjit_exit_locations.rb @@ -1,39 +1,25 @@ # frozen_string_literal: true # # This set of tests can be run with: -# make test-all TESTS='test/ruby/test_yjit_exit_locations.rb' RUN_OPTS="--yjit-call-threshold=1" +# make test-all TESTS='test/ruby/test_yjit_exit_locations.rb' require 'test/unit' require 'envutil' require 'tmpdir' require_relative '../lib/jit_support' -return unless defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled? +return unless JITSupport.yjit_supported? # Tests for YJIT with assertions on tracing exits -# insipired by the MJIT tests in test/ruby/test_yjit.rb +# insipired by the RJIT tests in test/ruby/test_yjit.rb class TestYJITExitLocations < Test::Unit::TestCase def test_yjit_trace_exits_and_v_no_error _stdout, stderr, _status = EnvUtil.invoke_ruby(%w(-v --yjit-trace-exits), '', true, true) refute_includes(stderr, "NoMethodError") end - def test_trace_exits_setclassvariable - script = 'class Foo; def self.foo; @@foo = 1; end; end; Foo.foo' - assert_exit_locations(script) - end - - def test_trace_exits_putobject - assert_exit_locations('true') - assert_exit_locations('123') - assert_exit_locations(':foo') - end - - def test_trace_exits_opt_not - assert_exit_locations('!false') - assert_exit_locations('!nil') - assert_exit_locations('!true') - assert_exit_locations('![]') + def test_trace_exits_expandarray_splat + assert_exit_locations('*arr = []') end private |