Skip to content

Commit 7630b27

Browse files
committed
Ruby: update AST and CFG test data
1 parent 26a0167 commit 7630b27

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ control/cases.rb:
800800
# 52| getBranch: [InClause] in ... then ...
801801
# 52| getPattern: [HashPattern] { ..., ** }
802802
# 52| getKey: [SymbolLiteral] :a
803+
# 52| getValue: [LocalVariableAccess] a
803804
# 53| getBranch: [InClause] in ... then ...
804805
# 53| getPattern: [HashPattern] { ..., ** }
805806
# 53| getKey: [SymbolLiteral] :a
@@ -813,17 +814,20 @@ control/cases.rb:
813814
# 55| getKey: [SymbolLiteral] :a
814815
# 55| getValue: [IntegerLiteral] 5
815816
# 55| getKey: [SymbolLiteral] :b
817+
# 55| getValue: [LocalVariableAccess] b
816818
# 56| getBranch: [InClause] in ... then ...
817819
# 56| getPattern: [HashPattern] { ..., ** }
818820
# 56| getKey: [SymbolLiteral] :a
819821
# 56| getValue: [IntegerLiteral] 5
820822
# 56| getKey: [SymbolLiteral] :b
823+
# 56| getValue: [LocalVariableAccess] b
821824
# 56| getRestVariableAccess: [LocalVariableAccess] map
822825
# 57| getBranch: [InClause] in ... then ...
823826
# 57| getPattern: [HashPattern] { ..., ** }
824827
# 57| getKey: [SymbolLiteral] :a
825828
# 57| getValue: [IntegerLiteral] 5
826829
# 57| getKey: [SymbolLiteral] :b
830+
# 57| getValue: [LocalVariableAccess] b
827831
# 58| getBranch: [InClause] in ... then ...
828832
# 58| getPattern: [HashPattern] { ..., ** }
829833
# 59| getBranch: [InClause] in ... then ...
@@ -878,6 +882,7 @@ control/cases.rb:
878882
# 71| getBranch: [InClause] in ... then ...
879883
# 71| getPattern: [HashPattern] { ..., ** }
880884
# 71| getKey: [SymbolLiteral] :a
885+
# 71| getValue: [LocalVariableAccess] a
881886
# 72| getBranch: [InClause] in ... then ...
882887
# 72| getPattern: [HashPattern] { ..., ** }
883888
# 72| getKey: [SymbolLiteral] :a
@@ -891,17 +896,20 @@ control/cases.rb:
891896
# 74| getKey: [SymbolLiteral] :a
892897
# 74| getValue: [IntegerLiteral] 5
893898
# 74| getKey: [SymbolLiteral] :b
899+
# 74| getValue: [LocalVariableAccess] b
894900
# 75| getBranch: [InClause] in ... then ...
895901
# 75| getPattern: [HashPattern] { ..., ** }
896902
# 75| getKey: [SymbolLiteral] :a
897903
# 75| getValue: [IntegerLiteral] 5
898904
# 75| getKey: [SymbolLiteral] :b
905+
# 75| getValue: [LocalVariableAccess] b
899906
# 75| getRestVariableAccess: [LocalVariableAccess] map
900907
# 76| getBranch: [InClause] in ... then ...
901908
# 76| getPattern: [HashPattern] { ..., ** }
902909
# 76| getKey: [SymbolLiteral] :a
903910
# 76| getValue: [IntegerLiteral] 5
904911
# 76| getKey: [SymbolLiteral] :b
912+
# 76| getValue: [LocalVariableAccess] b
905913
# 77| getBranch: [InClause] in ... then ...
906914
# 77| getPattern: [HashPattern] { ..., ** }
907915
# 78| getBranch: [InClause] in ... then ...
@@ -1078,6 +1086,7 @@ control/cases.rb:
10781086
# 139| getBranch: [InClause] in ... then ...
10791087
# 139| getPattern: [HashPattern] { ..., ** }
10801088
# 139| getKey: [SymbolLiteral] :x
1089+
# 139| getValue: [LocalVariableAccess] x
10811090
# 140| getBranch: [InClause] in ... then ...
10821091
# 140| getPattern: [HashPattern] { ..., ** }
10831092
# 140| getClass: [ConstantReadAccess] Bar
@@ -1091,11 +1100,13 @@ control/cases.rb:
10911100
# 141| getKey: [SymbolLiteral] :x
10921101
# 141| getValue: [IntegerLiteral] 1
10931102
# 141| getKey: [SymbolLiteral] :a
1103+
# 141| getValue: [LocalVariableAccess] a
10941104
# 141| getRestVariableAccess: [LocalVariableAccess] rest
10951105
# 142| getBranch: [InClause] in ... then ...
10961106
# 142| getPattern: [HashPattern] { ..., ** }
10971107
# 142| getClass: [ConstantReadAccess] Foo
10981108
# 142| getKey: [SymbolLiteral] :y
1109+
# 142| getValue: [LocalVariableAccess] y
10991110
# 143| getBranch: [InClause] in ... then ...
11001111
# 143| getPattern: [HashPattern] { ..., ** }
11011112
# 143| getClass: [ConstantReadAccess] Bar

ruby/ql/test/library-tests/controlflow/graph/Cfg.expected

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,9 @@ case.rb:
936936

937937
# 49| 1
938938
#-----| no-match -> in ... then ...
939+
#-----| match -> a
940+
941+
# 49| a
939942
#-----| match -> rest
940943

941944
# 49| rest
@@ -1361,8 +1364,8 @@ case.rb:
13611364
#-----| match -> case ...
13621365

13631366
# 91| [ ..., * ]
1364-
#-----| match -> case ...
13651367
#-----| no-match -> { ..., ** }
1368+
#-----| match -> case ...
13661369

13671370
# 91| { ..., ** }
13681371
#-----| match -> case ...

0 commit comments

Comments
 (0)