summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-08-18 15:09:38 -0400
committerJemma Issroff <jemmaissroff@gmail.com>2023-08-21 10:43:16 -0700
commit988b0108fbc0caac2758e410edb8b5fcf6a62aad (patch)
treef4eb933f873b0677efcdd9d2c0d44f1ad432c299 /test
parent339b34be474debfb1a4452ecf5d62cd491bf07d2 (diff)
[ruby/yarp] Consolidate OperatorAndWrite and OperatorOrWrite nodes
https://github.com/ruby/yarp/commit/9e680a7598
Diffstat (limited to 'test')
-rw-r--r--test/yarp/location_test.rb41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/yarp/location_test.rb b/test/yarp/location_test.rb
index 703c8e24f0..3902b2036c 100644
--- a/test/yarp/location_test.rb
+++ b/test/yarp/location_test.rb
@@ -209,6 +209,13 @@ module YARP
assert_location(ClassNode, "class Foo < Bar end")
end
+<<<<<<< HEAD:test/yarp/location_test.rb
+=======
+ def test_ClassVariableOperatorWriteNode
+ assert_location(ClassVariableOperatorWriteNode, "@@foo += bar")
+ end
+
+>>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb
def test_ClassVariableReadNode
assert_location(ClassVariableReadNode, "@@foo")
end
@@ -229,6 +236,17 @@ module YARP
assert_location(ConstantPathWriteNode, "::Foo::Bar = baz")
end
+<<<<<<< HEAD:test/yarp/location_test.rb
+=======
+ def test_ConstantPathOperatorWriteNode
+ assert_location(ConstantPathOperatorWriteNode, "Parent::Child += bar")
+ end
+
+ def test_ConstantOperatorWriteNode
+ assert_location(ConstantOperatorWriteNode, "Foo += bar")
+ end
+
+>>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb
def test_ConstantReadNode
assert_location(ConstantReadNode, "Foo")
assert_location(ConstantReadNode, "Foo::Bar", 5...8, &:child)
@@ -302,6 +320,13 @@ module YARP
assert_location(ForwardingSuperNode, "super {}")
end
+<<<<<<< HEAD:test/yarp/location_test.rb
+=======
+ def test_GlobalVariableOperatorWriteNode
+ assert_location(GlobalVariableOperatorWriteNode, "$foo += bar")
+ end
+
+>>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb
def test_GlobalVariableReadNode
assert_location(GlobalVariableReadNode, "$foo")
end
@@ -336,6 +361,13 @@ module YARP
end
end
+<<<<<<< HEAD:test/yarp/location_test.rb
+=======
+ def test_InstanceVariableOperatorWriteNode
+ assert_location(InstanceVariableOperatorWriteNode, "@foo += bar")
+ end
+
+>>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb
def test_InstanceVariableReadNode
assert_location(InstanceVariableReadNode, "@foo")
end
@@ -402,6 +434,15 @@ module YARP
assert_location(LambdaNode, "-> do foo end")
end
+<<<<<<< HEAD:test/yarp/location_test.rb
+=======
+ def test_LocalVariableOperatorWriteNode
+ assert_location(LocalVariableOperatorWriteNode, "foo += bar")
+ assert_location(LocalVariableOperatorWriteNode, "foo = 1; foo += bar", 9...19)
+ end
+
+
+>>>>>>> 9e680a7598 (Consolidate OperatorAndWrite and OperatorOrWrite nodes):test/location_test.rb
def test_LocalVariableReadNode
assert_location(LocalVariableReadNode, "foo = 1; foo", 9...12)
end