Skip to content

Commit f391948

Browse files
committed
Ruby: update expected output
1 parent 4af0c4b commit f391948

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,30 @@ control/cases.rb:
326326
# 91| getComponent: [StringTextComponent] foo
327327
# 91| getArgument: [SymbolLiteral] :"bar"
328328
# 91| getComponent: [StringTextComponent] bar
329+
# 160| [TestPattern] ... in ...
330+
# 160| getDesugared: [CaseExpr] case ...
331+
# 160| getValue: [MethodCall] call to expr
332+
# 160| getReceiver: [SelfVariableAccess] self
333+
# 160| getBranch: [InClause] in ... then ...
334+
# 160| getBody: [BooleanLiteral] true
335+
# 160| getPattern: [ArrayPattern] [ ..., * ]
336+
# 160| getPrefixElement: [IntegerLiteral] 1
337+
# 160| getPrefixElement: [IntegerLiteral] 2
338+
# 160| getBranch/getElseBranch: [StmtSequence] else ...
339+
# 160| getStmt: [BooleanLiteral] false
340+
# 162| [MatchPattern] ... => ...
341+
# 162| getDesugared: [CaseExpr] case ...
342+
# 162| getValue: [MethodCall] call to expr
343+
# 162| getReceiver: [SelfVariableAccess] self
344+
# 162| getBranch: [InClause] in ... then ...
345+
# 162| getBody: [NilLiteral] nil
346+
# 162| getPattern: [HashPattern] { ..., ** }
347+
# 162| getKey: [SymbolLiteral] :x
348+
# 162| getComponent: [StringTextComponent] x
349+
# 162| getValue: [LocalVariableAccess] v
350+
# 162| getKey: [SymbolLiteral] :y
351+
# 162| getComponent: [StringTextComponent] y
352+
# 162| getValue: [IntegerLiteral] 1
329353
constants/constants.rb:
330354
# 20| [ArrayLiteral] [...]
331355
# 20| getDesugared: [MethodCall] call to []

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,11 @@ exprValue
263263
| control/cases.rb:157:8:157:8 | 1 | 1 | int |
264264
| control/cases.rb:157:8:157:12 | ... + ... | 2 | int |
265265
| control/cases.rb:157:12:157:12 | 1 | 1 | int |
266+
| control/cases.rb:160:1:160:14 | false | false | boolean |
267+
| control/cases.rb:160:1:160:14 | true | true | boolean |
266268
| control/cases.rb:160:10:160:10 | 1 | 1 | int |
267269
| control/cases.rb:160:13:160:13 | 2 | 2 | int |
270+
| control/cases.rb:162:1:162:20 | nil | nil | nil |
268271
| control/cases.rb:162:10:162:10 | :x | :x | symbol |
269272
| control/cases.rb:162:16:162:16 | :y | :y | symbol |
270273
| control/cases.rb:162:19:162:19 | 1 | 1 | int |
@@ -1152,6 +1155,12 @@ exprCfgNodeValue
11521155
| control/cases.rb:157:8:157:8 | 1 | 1 | int |
11531156
| control/cases.rb:157:8:157:12 | ... + ... | 2 | int |
11541157
| control/cases.rb:157:12:157:12 | 1 | 1 | int |
1158+
| control/cases.rb:160:1:160:14 | false | false | boolean |
1159+
| control/cases.rb:160:1:160:14 | true | true | boolean |
1160+
| control/cases.rb:160:10:160:10 | 1 | 1 | int |
1161+
| control/cases.rb:160:13:160:13 | 2 | 2 | int |
1162+
| control/cases.rb:162:1:162:20 | nil | nil | nil |
1163+
| control/cases.rb:162:19:162:19 | 1 | 1 | int |
11551164
| control/conditionals.rb:2:5:2:5 | 0 | 0 | int |
11561165
| control/conditionals.rb:3:5:3:5 | 0 | 0 | int |
11571166
| control/conditionals.rb:4:5:4:5 | 0 | 0 | int |

ruby/ql/test/library-tests/ast/control/CaseExpr.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@ caseValues
1010
| cases.rb:137:1:145:3 | case ... | cases.rb:137:6:137:9 | call to expr |
1111
| cases.rb:147:1:152:3 | case ... | cases.rb:147:6:147:9 | call to expr |
1212
| cases.rb:154:1:158:3 | case ... | cases.rb:154:6:154:9 | call to expr |
13+
| cases.rb:160:1:160:14 | case ... | cases.rb:160:1:160:4 | call to expr |
14+
| cases.rb:162:1:162:20 | case ... | cases.rb:162:1:162:4 | call to expr |
1315
caseNoValues
1416
| cases.rb:18:1:22:3 | case ... |
1517
caseElseBranches
1618
| cases.rb:8:1:15:3 | case ... | cases.rb:13:1:14:7 | else ... |
1719
| cases.rb:26:1:29:3 | case ... | cases.rb:28:3:28:12 | else ... |
1820
| cases.rb:31:1:37:3 | case ... | cases.rb:36:3:36:12 | else ... |
21+
| cases.rb:160:1:160:14 | case ... | cases.rb:160:1:160:14 | else ... |
1922
caseNoElseBranches
2023
| cases.rb:18:1:22:3 | case ... |
2124
| cases.rb:39:1:80:3 | case ... |
@@ -26,6 +29,7 @@ caseNoElseBranches
2629
| cases.rb:137:1:145:3 | case ... |
2730
| cases.rb:147:1:152:3 | case ... |
2831
| cases.rb:154:1:158:3 | case ... |
32+
| cases.rb:162:1:162:20 | case ... |
2933
caseWhenBranches
3034
| cases.rb:8:1:15:3 | case ... | cases.rb:9:1:10:7 | when ... | 0 | cases.rb:9:6:9:6 | b | cases.rb:9:7:10:7 | then ... |
3135
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 0 | cases.rb:11:6:11:6 | c | cases.rb:11:10:12:7 | then ... |
@@ -132,3 +136,6 @@ caseAllBranches
132136
| cases.rb:154:1:158:3 | case ... | 0 | cases.rb:155:3:155:12 | in ... then ... |
133137
| cases.rb:154:1:158:3 | case ... | 1 | cases.rb:156:3:156:13 | in ... then ... |
134138
| cases.rb:154:1:158:3 | case ... | 2 | cases.rb:157:3:157:14 | in ... then ... |
139+
| cases.rb:160:1:160:14 | case ... | 0 | cases.rb:160:1:160:14 | in ... then ... |
140+
| cases.rb:160:1:160:14 | case ... | 1 | cases.rb:160:1:160:14 | else ... |
141+
| cases.rb:162:1:162:20 | case ... | 0 | cases.rb:162:1:162:20 | in ... then ... |

ruby/ql/test/library-tests/ast/control/ControlExpr.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
| cases.rb:137:1:145:3 | case ... | CaseExpr |
1111
| cases.rb:147:1:152:3 | case ... | CaseExpr |
1212
| cases.rb:154:1:158:3 | case ... | CaseExpr |
13+
| cases.rb:160:1:160:14 | case ... | CaseExpr |
14+
| cases.rb:162:1:162:20 | case ... | CaseExpr |
1315
| conditionals.rb:10:1:12:3 | if ... | IfExpr |
1416
| conditionals.rb:15:1:19:3 | if ... | IfExpr |
1517
| conditionals.rb:22:1:30:3 | if ... | IfExpr |

0 commit comments

Comments
 (0)