From f9e122b3d65ec00cb501fd8d3df175c8453f261f Mon Sep 17 00:00:00 2001 From: Jemma Issroff Date: Fri, 20 Oct 2023 12:25:26 -0300 Subject: [PRISM] Add several tests --- test/ruby/test_compile_prism.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 6b19abfe68..58744836b2 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -56,8 +56,10 @@ module Prism end def test_SourceLineNode - # TODO: - # test_prism_eval("__LINE__") + ruby_eval = RubyVM::InstructionSequence.compile_prism("__LINE__").eval + prism_eval = RubyVM::InstructionSequence.compile_prism("__LINE__").eval + + assert_equal ruby_eval, prism_eval end def test_TrueNode @@ -69,7 +71,7 @@ module Prism ############################################################################ def test_BackReferenceReadNode - # TOO + test_prism_eval("$+") end def test_ClassVariableReadNode @@ -538,8 +540,7 @@ module Prism end def test_SingletonClassNode - # TODO: - # test_prism_eval("class << self; end") + test_prism_eval("class << self; end") end def test_StatementsNode -- cgit v1.2.3