diff options
author | Jemma Issroff <[email protected]> | 2023-08-30 17:30:42 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-30 14:30:42 -0700 |
commit | 36786cc381c118986e66d8c3184e25adbaeaf591 (patch) | |
tree | 8d0680387bb7d9cd4d6512100cbee1e2814eed8f /test/yarp/compiler_test.rb | |
parent | 0ec5021f3d14707d1354158b8dec26ba6e079396 (diff) |
[YARP] Compile ProgramNode as ScopeNode (#8327)
* [YARP] Compile ProgramNode as ScopeNode
Notes
Notes:
Merged-By: jemmaissroff
Diffstat (limited to 'test/yarp/compiler_test.rb')
-rw-r--r-- | test/yarp/compiler_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb index bb1a1f47e8..668908d423 100644 --- a/test/yarp/compiler_test.rb +++ b/test/yarp/compiler_test.rb @@ -69,6 +69,10 @@ module YARP assert_equal 1, compile("class YARP::CompilerTest; @yct = 1; @yct; end") end + def test_LocalVariableReadNode + assert_equal 1, compile("yct = 1; yct") + end + ############################################################################ # Writes # ############################################################################ @@ -93,6 +97,10 @@ module YARP assert_equal 1, compile("class YARP::CompilerTest; @yct = 1; end") end + def test_LocalVariableWriteNode + assert_equal 1, compile("yct = 1") + end + ############################################################################ # String-likes # ############################################################################ |