Skip to content

Commit b657301

Browse files
committed
Swift: update test expectations
1 parent e9fdbfa commit b657301

File tree

4 files changed

+44
-0
lines changed

4 files changed

+44
-0
lines changed

swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| var_decls.swift:2:12:2:12 | $i$generator | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | IndexingIterator<ClosedRange<Int>> | getNumberOfAccessors: | 0 | getName: | $i$generator | getType: | IndexingIterator<ClosedRange<Int>> | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 |
12
| var_decls.swift:4:7:4:7 | i | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | Int | getNumberOfAccessors: | 0 | getName: | i | getType: | Int | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 |
23
| var_decls.swift:7:5:7:5 | numbers | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | [Int] | getNumberOfAccessors: | 0 | getName: | numbers | getType: | [Int] | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 1 |
34
| var_decls.swift:10:12:10:12 | numbers | getModule: | file://:0:0:0:0 | var_decls | getNumberOfMembers: | 0 | getInterfaceType: | [Int] | getNumberOfAccessors: | 1 | getName: | numbers | getType: | [Int] | hasAttachedPropertyWrapperType: | no | hasParentPattern: | yes | hasParentInitializer: | yes | hasPropertyWrapperBackingVarBinding: | no | hasPropertyWrapperBackingVar: | no | hasPropertyWrapperProjectionVarBinding: | no | hasPropertyWrapperProjectionVar: | no | getIntroducerInt: | 0 |

swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentInitializer.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:16 | call to makeIterator() |
12
| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:11:4:11 | 0 |
23
| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:15:7:18 | [...] |
34
| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:22:10:35 | [...] |

swift/ql/test/extractor-tests/generated/decl/ConcreteVarDecl/ConcreteVarDecl_getParentPattern.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
| var_decls.swift:2:12:2:12 | $i$generator | var_decls.swift:2:12:2:12 | $i$generator |
12
| var_decls.swift:4:7:4:7 | i | var_decls.swift:4:7:4:7 | i |
23
| var_decls.swift:7:5:7:5 | numbers | var_decls.swift:7:5:7:5 | numbers |
34
| var_decls.swift:10:12:10:12 | numbers | var_decls.swift:10:12:10:12 | numbers |

swift/ql/test/library-tests/ast/PrintAst.expected

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,11 @@ cfg.swift:
715715
# 138| getArgument(1): [Argument] : 10
716716
# 138| getExpr(): [IntegerLiteralExpr] 10
717717
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
718+
# 138| getNextCall(): [CallExpr] call to next()
719+
# 138| getFunction(): [MethodLookupExpr] .next()
720+
# 138| getBase(): [DeclRefExpr] $generator
721+
# 138| getBase().getFullyConverted(): [InOutExpr] &...
722+
#-----| getMethodRef(): [DeclRefExpr] next()
718723
# 138| getBody(): [BraceStmt] { ... }
719724
# 140| getElement(1): [SwitchStmt] switch x { ... }
720725
# 140| getExpr(): [DeclRefExpr] x
@@ -837,6 +842,9 @@ cfg.swift:
837842
# 158| getElse(): [BraceStmt] { ... }
838843
# 159| getElement(0): [ReturnStmt] return ...
839844
# 159| getResult(): [BooleanLiteralExpr] false
845+
# 138| [NamedPattern] $generator
846+
# 138| [ConcreteVarDecl] $generator
847+
# 138| Type = IndexingIterator<ClosedRange<Int>>
840848
# 141| [ConcreteVarDecl] $match
841849
# 141| Type = Int
842850
# 141| [ConcreteVarDecl] $match
@@ -3262,6 +3270,11 @@ cfg.swift:
32623270
# 526| getArgument(1): [Argument] : 100
32633271
# 526| getExpr(): [IntegerLiteralExpr] 100
32643272
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
3273+
# 526| getNextCall(): [CallExpr] call to next()
3274+
# 526| getFunction(): [MethodLookupExpr] .next()
3275+
# 526| getBase(): [DeclRefExpr] $i$generator
3276+
# 526| getBase().getFullyConverted(): [InOutExpr] &...
3277+
#-----| getMethodRef(): [DeclRefExpr] next()
32653278
# 526| getBody(): [BraceStmt] { ... }
32663279
# 527| getElement(0): [CallExpr] call to yield(_:)
32673280
# 527| getFunction(): [MethodLookupExpr] .yield(_:)
@@ -3283,6 +3296,12 @@ cfg.swift:
32833296
# 533| getBase(): [DeclRefExpr] stream
32843297
# 533| getBase().getFullyConverted(): [LoadExpr] (AsyncStream<Int>) ...
32853298
#-----| getMethodRef(): [DeclRefExpr] makeAsyncIterator()
3299+
# 533| getNextCall(): [CallExpr] call to next()
3300+
# 533| getFunction(): [MethodLookupExpr] .next()
3301+
# 533| getBase(): [DeclRefExpr] $i$generator
3302+
# 533| getBase().getFullyConverted(): [InOutExpr] &...
3303+
#-----| getMethodRef(): [DeclRefExpr] next()
3304+
#-----| getNextCall().getFullyConverted(): [AwaitExpr] await ...
32863305
# 533| getBody(): [BraceStmt] { ... }
32873306
# 534| getElement(0): [CallExpr] call to print(_:separator:terminator:)
32883307
# 534| getFunction(): [DeclRefExpr] print(_:separator:terminator:)
@@ -3298,8 +3317,14 @@ cfg.swift:
32983317
# 525| [NilLiteralExpr] nil
32993318
# 526| [ConcreteVarDecl] i
33003319
# 526| Type = Int
3320+
# 526| [NamedPattern] $i$generator
3321+
# 526| [ConcreteVarDecl] $i$generator
3322+
# 526| Type = IndexingIterator<ClosedRange<Int>>
33013323
# 533| [ConcreteVarDecl] i
33023324
# 533| Type = Int
3325+
# 533| [NamedPattern] $i$generator
3326+
# 533| [ConcreteVarDecl] $i$generator
3327+
# 533| Type = AsyncStream<Int>.Iterator
33033328
declarations.swift:
33043329
# 1| [StructDecl] Foo
33053330
# 2| getMember(0): [PatternBindingDecl] var ... = ...
@@ -6599,6 +6624,11 @@ statements.swift:
65996624
# 2| getArgument(1): [Argument] : 5
66006625
# 2| getExpr(): [IntegerLiteralExpr] 5
66016626
#-----| getMethodRef(): [DeclRefExpr] makeIterator()
6627+
# 2| getNextCall(): [CallExpr] call to next()
6628+
# 2| getFunction(): [MethodLookupExpr] .next()
6629+
# 2| getBase(): [DeclRefExpr] $i$generator
6630+
# 2| getBase().getFullyConverted(): [InOutExpr] &...
6631+
#-----| getMethodRef(): [DeclRefExpr] next()
66026632
# 2| getBody(): [BraceStmt] { ... }
66036633
# 3| getElement(0): [IfStmt] if ... then { ... } else { ... }
66046634
# 3| getCondition(): [StmtCondition] StmtCondition
@@ -6738,6 +6768,9 @@ statements.swift:
67386768
# 29| getPattern().getFullyUnresolved(): [BindingPattern] let ...
67396769
# 2| [ConcreteVarDecl] i
67406770
# 2| Type = Int
6771+
# 2| [NamedPattern] $i$generator
6772+
# 2| [ConcreteVarDecl] $i$generator
6773+
# 2| Type = IndexingIterator<ClosedRange<Int>>
67416774
# 21| [ConcreteVarDecl] error
67426775
# 21| Type = Error
67436776
# 29| [ConcreteVarDecl] error
@@ -7032,9 +7065,17 @@ statements.swift:
70327065
# 71| getExpr(): [IntegerLiteralExpr] 2
70337066
# 71| getArgument(1): [Argument] : 0
70347067
# 71| getExpr(): [IntegerLiteralExpr] 0
7068+
# 71| getNextCall(): [CallExpr] call to next()
7069+
# 71| getFunction(): [MethodLookupExpr] .next()
7070+
# 71| getBase(): [DeclRefExpr] $number$generator
7071+
# 71| getBase().getFullyConverted(): [InOutExpr] &...
7072+
#-----| getMethodRef(): [DeclRefExpr] next()
70357073
# 71| getBody(): [BraceStmt] { ... }
70367074
# 71| [ConcreteVarDecl] number
70377075
# 71| Type = Int
7076+
# 71| [NamedPattern] $number$generator
7077+
# 71| [ConcreteVarDecl] $number$generator
7078+
# 71| Type = IndexingIterator<[Int]>
70387079
# 74| [StructDecl] HasModifyAccessorDecl
70397080
# 75| getMember(0): [PatternBindingDecl] var ... = ...
70407081
# 75| getPattern(0): [TypedPattern] ... as ...

0 commit comments

Comments
 (0)