Skip to content

Commit 3bf148a

Browse files
committed
Allow folding range response from clangd
clangd supports folding range in stable/20221013. Update the test to allow an actual response.
1 parent c31dff2 commit 3bf148a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/SourceKitLSPTests/LocalClangTests.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@ final class LocalClangTests: XCTestCase {
150150
""")))
151151

152152
let resp = try! sk.sendSync(FoldingRangeRequest(textDocument: TextDocumentIdentifier(url)))
153-
XCTAssertNil(resp)
153+
if let resp = resp {
154+
XCTAssertEqual(resp, [
155+
FoldingRange(startLine: 0, startUTF16Index: 10, endLine: 4, kind: .region),
156+
FoldingRange(startLine: 1, startUTF16Index: 14, endLine: 3, endUTF16Index: 2, kind: .region),
157+
])
158+
}
154159
}
155160

156161
func testDocumentSymbols() throws {

0 commit comments

Comments
 (0)