Skip to content

Commit c437fd5

Browse files
committed
Update test fixtures
Some of these look a bit suspicious, so need to double check them before merging.
1 parent c71f538 commit c437fd5

File tree

7 files changed

+544
-168
lines changed

7 files changed

+544
-168
lines changed

ruby/ql/test/library-tests/ast/Ast.expected

Lines changed: 153 additions & 153 deletions
Large diffs are not rendered by default.

ruby/ql/test/library-tests/ast/AstDesugar.expected

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ calls/calls.rb:
33
# 58| getDesugared: [MethodCall] call to []
44
# 58| getReceiver: [ConstantReadAccess] Array
55
# 58| getArgument: [MethodCall] call to foo
6-
# 58| getReceiver: [Self] self
6+
# 58| getReceiver: [Self, SelfVariableAccess] self
77
# 59| [ArrayLiteral] [...]
88
# 59| getDesugared: [MethodCall] call to []
99
# 59| getReceiver: [ConstantReadAccess] Array
@@ -15,7 +15,7 @@ calls/calls.rb:
1515
# 66| getAnOperand/getRightOperand: [AddExpr] ... + ...
1616
# 66| getAnOperand/getLeftOperand/getReceiver: [LocalVariableAccess] var1
1717
# 66| getAnOperand/getArgument/getRightOperand: [MethodCall] call to bar
18-
# 66| getReceiver: [Self] self
18+
# 66| getReceiver: [Self, SelfVariableAccess] self
1919
# 67| [AssignAddExpr] ... += ...
2020
# 67| getDesugared: [AssignExpr] ... = ...
2121
# 67| getAnOperand/getLeftOperand: [LocalVariableAccess] var1
@@ -26,7 +26,7 @@ calls/calls.rb:
2626
# 314| [AssignExpr] ... = ...
2727
# 314| getDesugared: [StmtSequence] ...
2828
# 314| getStmt: [SetterMethodCall] call to foo=
29-
# 314| getReceiver: [Self] self
29+
# 314| getReceiver: [Self, SelfVariableAccess] self
3030
# 314| getArgument: [AssignExpr] ... = ...
3131
# 314| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0
3232
# 314| getAnOperand/getRightOperand: [IntegerLiteral] 10
@@ -35,7 +35,7 @@ calls/calls.rb:
3535
# 315| getDesugared: [StmtSequence] ...
3636
# 315| getStmt: [SetterMethodCall] call to []=
3737
# 315| getReceiver: [MethodCall] call to foo
38-
# 315| getReceiver: [Self] self
38+
# 315| getReceiver: [Self, SelfVariableAccess] self
3939
# 315| getArgument: [AssignExpr] ... = ...
4040
# 315| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0
4141
# 315| getAnOperand/getRightOperand: [IntegerLiteral] 10
@@ -47,7 +47,7 @@ calls/calls.rb:
4747
# 316| getAnOperand/getLeftOperand: [MethodCall] call to foo
4848
# 316| getDesugared: [StmtSequence] ...
4949
# 316| getStmt: [SetterMethodCall] call to foo=
50-
# 316| getReceiver: [Self] self
50+
# 316| getReceiver: [Self, SelfVariableAccess] self
5151
# 316| getArgument: [AssignExpr] ... = ...
5252
# 316| getAnOperand/getRightOperand: [MethodCall] call to []
5353
# 316| getArgument: [IntegerLiteral] 0
@@ -58,7 +58,7 @@ calls/calls.rb:
5858
# 316| getAnOperand/getLeftOperand: [MethodCall] call to bar
5959
# 316| getDesugared: [StmtSequence] ...
6060
# 316| getStmt: [SetterMethodCall] call to bar=
61-
# 316| getReceiver: [Self] self
61+
# 316| getReceiver: [Self, SelfVariableAccess] self
6262
# 316| getArgument: [AssignExpr] ... = ...
6363
# 316| getAnOperand/getRightOperand: [MethodCall] call to []
6464
# 316| getArgument: [RangeLiteral] _ .. _
@@ -72,7 +72,7 @@ calls/calls.rb:
7272
# 316| getDesugared: [StmtSequence] ...
7373
# 316| getStmt: [SetterMethodCall] call to []=
7474
# 316| getReceiver: [MethodCall] call to foo
75-
# 316| getReceiver: [Self] self
75+
# 316| getReceiver: [Self, SelfVariableAccess] self
7676
# 316| getArgument: [AssignExpr] ... = ...
7777
# 316| getAnOperand/getRightOperand: [MethodCall] call to []
7878
# 316| getArgument: [IntegerLiteral] -1
@@ -102,7 +102,7 @@ calls/calls.rb:
102102
# 317| getDesugared: [StmtSequence] ...
103103
# 317| getStmt: [SetterMethodCall] call to []=
104104
# 317| getReceiver: [MethodCall] call to foo
105-
# 317| getReceiver: [Self] self
105+
# 317| getReceiver: [Self, SelfVariableAccess] self
106106
# 317| getArgument: [AssignExpr] ... = ...
107107
# 317| getAnOperand/getRightOperand: [MethodCall] call to []
108108
# 317| getArgument: [RangeLiteral] _ .. _
@@ -124,7 +124,7 @@ calls/calls.rb:
124124
# 318| [AssignAddExpr] ... += ...
125125
# 318| getDesugared: [StmtSequence] ...
126126
# 318| getStmt: [AssignExpr] ... = ...
127-
# 318| getAnOperand/getRightOperand: [Self] self
127+
# 318| getAnOperand/getRightOperand: [Self, SelfVariableAccess] self
128128
# 318| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0
129129
# 318| getStmt: [SetterMethodCall] call to count=
130130
# 318| getReceiver: [LocalVariableAccess] __synth__0
@@ -140,7 +140,7 @@ calls/calls.rb:
140140
# 319| getDesugared: [StmtSequence] ...
141141
# 319| getStmt: [AssignExpr] ... = ...
142142
# 319| getAnOperand/getRightOperand: [MethodCall] call to foo
143-
# 319| getReceiver: [Self] self
143+
# 319| getReceiver: [Self, SelfVariableAccess] self
144144
# 319| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0
145145
# 319| getStmt: [SetterMethodCall] call to []=
146146
# 319| getReceiver: [LocalVariableAccess] __synth__0
@@ -162,7 +162,7 @@ calls/calls.rb:
162162
# 320| getStmt: [AssignExpr] ... = ...
163163
# 320| getAnOperand/getRightOperand: [MethodCall] call to bar
164164
# 320| getReceiver: [MethodCall] call to foo
165-
# 320| getReceiver: [Self] self
165+
# 320| getReceiver: [Self, SelfVariableAccess] self
166166
# 320| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0
167167
# 320| getStmt: [SetterMethodCall] call to []=
168168
# 320| getReceiver: [LocalVariableAccess] __synth__0
@@ -176,13 +176,13 @@ calls/calls.rb:
176176
# 320| getStmt: [AssignExpr] ... = ...
177177
# 320| getAnOperand/getRightOperand: [MethodCall] call to baz
178178
# 320| getReceiver: [MethodCall] call to foo
179-
# 320| getReceiver: [Self] self
179+
# 320| getReceiver: [Self, SelfVariableAccess] self
180180
# 320| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__2
181181
# 320| getStmt: [AssignExpr] ... = ...
182182
# 320| getAnOperand/getRightOperand: [AddExpr] ... + ...
183183
# 320| getAnOperand/getLeftOperand/getReceiver: [MethodCall] call to boo
184184
# 320| getReceiver: [MethodCall] call to foo
185-
# 320| getReceiver: [Self] self
185+
# 320| getReceiver: [Self, SelfVariableAccess] self
186186
# 320| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
187187
# 320| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__3
188188
# 320| getStmt: [AssignExpr] ... = ...

ruby/ql/test/library-tests/dataflow/local/DataflowStep.expected

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
| local_dataflow.rb:1:1:7:3 | self (foo) | local_dataflow.rb:3:8:3:10 | self |
12
| local_dataflow.rb:1:1:7:3 | self in foo | local_dataflow.rb:3:8:3:10 | self |
3+
| local_dataflow.rb:1:1:58:4 | self (local_dataflow.rb) | local_dataflow.rb:11:1:11:2 | self |
4+
| local_dataflow.rb:1:1:58:4 | self (local_dataflow.rb) | local_dataflow.rb:49:1:53:3 | self |
25
| local_dataflow.rb:1:9:1:9 | a | local_dataflow.rb:1:9:1:9 | a |
36
| local_dataflow.rb:1:9:1:9 | a | local_dataflow.rb:2:7:2:7 | a |
47
| local_dataflow.rb:2:3:2:7 | ... = ... | local_dataflow.rb:3:13:3:13 | b |
@@ -27,7 +30,13 @@
2730
| local_dataflow.rb:10:9:10:9 | x | local_dataflow.rb:12:5:12:5 | x |
2831
| local_dataflow.rb:10:14:10:18 | array | local_dataflow.rb:10:5:13:3 | for ... in ... |
2932
| local_dataflow.rb:10:14:10:18 | array | local_dataflow.rb:15:10:15:14 | array |
33+
| local_dataflow.rb:11:1:11:2 | [post] self | local_dataflow.rb:12:3:12:5 | self |
34+
| local_dataflow.rb:11:1:11:2 | self | local_dataflow.rb:12:3:12:5 | self |
35+
| local_dataflow.rb:12:3:12:5 | [post] self | local_dataflow.rb:11:1:11:2 | self |
36+
| local_dataflow.rb:12:3:12:5 | [post] self | local_dataflow.rb:49:1:53:3 | self |
3037
| local_dataflow.rb:12:3:12:5 | call to p | local_dataflow.rb:10:19:13:3 | do ... |
38+
| local_dataflow.rb:12:3:12:5 | self | local_dataflow.rb:11:1:11:2 | self |
39+
| local_dataflow.rb:12:3:12:5 | self | local_dataflow.rb:49:1:53:3 | self |
3140
| local_dataflow.rb:15:10:15:14 | array | local_dataflow.rb:15:1:17:3 | for ... in ... |
3241
| local_dataflow.rb:15:10:15:14 | array | local_dataflow.rb:19:10:19:14 | array |
3342
| local_dataflow.rb:16:3:16:10 | break | local_dataflow.rb:15:1:17:3 | for ... in ... |
@@ -51,6 +60,8 @@
5160
| local_dataflow.rb:41:7:41:7 | x | local_dataflow.rb:42:6:42:6 | x |
5261
| local_dataflow.rb:43:13:43:13 | 7 | local_dataflow.rb:43:6:43:13 | return |
5362
| local_dataflow.rb:45:10:45:10 | 6 | local_dataflow.rb:45:3:45:10 | return |
63+
| local_dataflow.rb:49:1:53:3 | [post] self | local_dataflow.rb:55:1:55:14 | self |
64+
| local_dataflow.rb:49:1:53:3 | self | local_dataflow.rb:55:1:55:14 | self |
5465
| local_dataflow.rb:49:3:53:3 | <captured> | local_dataflow.rb:50:18:50:18 | x |
5566
| local_dataflow.rb:50:8:50:13 | "next" | local_dataflow.rb:50:3:50:13 | next |
5667
| local_dataflow.rb:50:18:50:18 | [post] x | local_dataflow.rb:51:20:51:20 | x |

ruby/ql/test/library-tests/modules/callgraph.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ getTarget
22
| calls.rb:2:5:2:14 | call to puts | calls.rb:87:5:87:17 | puts |
33
| calls.rb:5:1:5:3 | call to foo | calls.rb:1:1:3:3 | foo |
44
| calls.rb:5:1:5:3 | call to foo | calls.rb:71:1:75:3 | foo |
5-
| calls.rb:8:5:8:14 | call to puts | calls.rb:87:5:87:17 | puts |
6-
| calls.rb:11:1:11:8 | call to bar | calls.rb:7:1:9:3 | bar |
75
| calls.rb:13:1:13:8 | call to foo | calls.rb:1:1:3:3 | foo |
86
| calls.rb:13:1:13:8 | call to foo | calls.rb:71:1:75:3 | foo |
97
| calls.rb:22:5:22:15 | call to singleton_m | calls.rb:17:5:17:29 | singleton_m |
@@ -86,6 +84,8 @@ getTarget
8684
| private.rb:28:1:28:12 | call to public | private.rb:5:3:6:5 | public |
8785
| private.rb:30:1:30:15 | call to private_on_main | private.rb:21:1:22:3 | private_on_main |
8886
unresolvedCall
87+
| calls.rb:8:5:8:14 | call to puts |
88+
| calls.rb:11:1:11:8 | call to bar |
8989
| calls.rb:19:5:19:14 | call to instance_m |
9090
| calls.rb:20:5:20:19 | call to instance_m |
9191
| calls.rb:26:1:26:12 | call to instance_m |

0 commit comments

Comments
 (0)