diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-01 19:42:48 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-01 19:42:48 +0900 |
commit | cb84824481f205d5c057fe2e31776d40a6b06c7c (patch) | |
tree | e81df532566b76725a1f6b0725471a3c4d137da8 /test/ruby | |
parent | 1549fbfda561759879f16e5d7b2451fe9ac03147 (diff) | |
download | ruby-cb84824481f205d5c057fe2e31776d40a6b06c7c.tar.gz |
Add a test for opt_nil_p
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_jit.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 727043fd00..24ab7fc2d1 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -43,7 +43,7 @@ class TestJIT < Test::Unit::TestCase if $VERBOSE && !defined?(@@at_exit_hooked) at_exit do unless TestJIT.untested_insns.empty? - warn "untested insns are found!: #{TestJIT.untested_insns.join(' ')}" + warn "you may want to add tests for following insns, when you have a chance: #{TestJIT.untested_insns.join(' ')}" end end @@at_exit_hooked = true @@ -365,6 +365,13 @@ class TestJIT < Test::Unit::TestCase end; end + def test_compile_insn_opt_nil_p + assert_compile_once("#{<<~"begin;"}\n#{<<~"end;"}", result_inspect: 'false', insns: %i[opt_nil_p]) + begin; + nil.nil?.nil? + end; + end + def test_compile_insn_opt_str_uminus assert_compile_once("#{<<~"begin;"}\n#{<<~"end;"}", result_inspect: '"bar"', insns: %i[opt_str_uminus]) begin; |