File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,12 @@ private func assertSingleFileRename(
48
48
) async throws {
49
49
try await SkipUnless . sourcekitdSupportsRename ( )
50
50
let testClient = try await TestSourceKitLSPClient ( )
51
- let uri = DocumentURI . for ( . swift, testName: testName)
51
+ let uri = DocumentURI . for ( language ?? . swift, testName: testName)
52
52
let positions = testClient. openDocument ( markedSource, uri: uri, language: language)
53
+ guard !positions. allMarkers. isEmpty else {
54
+ XCTFail ( " Test case did not contain any markers at which to invoke the rename " , file: file, line: line)
55
+ return
56
+ }
53
57
for marker in positions. allMarkers {
54
58
let prepareRenameResponse = try await testClient. send (
55
59
PrepareRenameRequest ( textDocument: TextDocumentIdentifier ( uri) , position: positions [ marker] )
You can’t perform that action at this time.
0 commit comments