Skip to content

Commit 1011c6e

Browse files
authored
Merge pull request #682 from bnbarham/update-clang-test
Allow folding range response from clangd
2 parents f75d20f + 3bf148a commit 1011c6e

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)