Skip to content

Commit 69f7cf2

Browse files
committed
Add test case for trailing closure
1 parent 8eb3d1d commit 69f7cf2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Tests/SwiftParserTest/IncrementalParsingTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,16 @@ public class IncrementalParsingTests: XCTestCase {
3535
ReusedNodeSpec(sourceString: "struct B {}", kind: .codeBlockItem)
3636
])
3737
}
38+
39+
public func testTrailingClosure() {
40+
XCTExpectFailure("WIP: Add lookahead for incremental parse")
41+
assertIncrementalParse(
42+
"""
43+
foo() {}
44+
trailingClosure: ⏩️switch x {
45+
default: break
46+
}⏸️{}⏪️
47+
"""
48+
)
49+
}
3850
}

0 commit comments

Comments
 (0)