Skip to content

Commit a791a3d

Browse files
committed
[libSyntax] Fix SwiftSyntax CodeBlockItemList test
1 parent bc52823 commit a791a3d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
struct {
1+
struct Foo {
22
func foo() {
33
print("hello")
44
func bar() {
55
print("goodbye")
66
}
77
}
8-
}
8+
}

test/SwiftSyntax/VisitorTest.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ VisitorTests.test("SyntaxRewriter.visitCollection") {
8383

8484
override func visit(_ items: CodeBlockItemListSyntax) {
8585
numberOfCodeBlockItems += items.count
86+
super.visit(items)
8687
}
8788
}
8889

@@ -92,7 +93,7 @@ VisitorTests.test("SyntaxRewriter.visitCollection") {
9293
)
9394
let visitor = VisitCollections()
9495
visitor.visit(parsed)
95-
expectEqual(3, visitor.numberOfCodeBlockItems)
96+
expectEqual(4, visitor.numberOfCodeBlockItems)
9697
})
9798
}
9899

0 commit comments

Comments
 (0)