summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2023-09-18 21:58:10 +0100
committerMatt Valentine-House <matt@eightbitraptor.com>2023-09-19 14:53:58 +0100
commit2f8daa5f5128ca63154ae6adb139c24ec0e14b40 (patch)
treed29e71f20c584eb982db84456bc778eff782cc1a /test
parent91b10c0b77c5408cbbbc2fc6d678ee92b2d4b28a (diff)
[YARP] Implement InstanceVariableTargetNode, LocalVariableTargetNode
Diffstat (limited to 'test')
-rw-r--r--test/yarp/compiler_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/yarp/compiler_test.rb b/test/yarp/compiler_test.rb
index c6b7fed1eb..d99c2c281e 100644
--- a/test/yarp/compiler_test.rb
+++ b/test/yarp/compiler_test.rb
@@ -149,6 +149,10 @@ module YARP
test_yarp_eval("$yct = 0; $yct += 1")
end
+ def test_InstanceVariableTargetNode
+ test_yarp_eval("class YARP::CompilerTest; @yct, @yct1 = 1; end")
+ end
+
def test_InstanceVariableWriteNode
test_yarp_eval("class YARP::CompilerTest; @yct = 1; end")
end
@@ -165,6 +169,10 @@ module YARP
test_yarp_eval("@yct = 0; @yct += 1")
end
+ def test_LocalVariableTargetNode
+ test_yarp_eval("yct, yct1 = 1")
+ end
+
def test_LocalVariableWriteNode
test_yarp_eval("yct = 1")
end