Skip to content

Commit 00cfa79

Browse files
author
Wang Lun
committed
fixed unit test
1 parent 36a5f83 commit 00cfa79

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Tests/SourceKitLSPTests/SwiftInterfaceTests.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ import SourceKitLSP
1919
import SwiftExtensions
2020
import XCTest
2121

22-
private extension Language {
23-
static let swiftinterface = Language(rawValue: "swiftinterface")
24-
}
25-
2622
final class SwiftInterfaceTests: XCTestCase {
2723
func testSystemModuleInterface() async throws {
2824
let testClient = try await TestSourceKitLSPClient()
@@ -330,7 +326,7 @@ final class SwiftInterfaceTests: XCTestCase {
330326
GetReferenceDocumentRequest.method: .dictionary(["supported": .bool(true)])
331327
])
332328
)
333-
let uri = DocumentURI(for: .swiftinterface)
329+
let uri = DocumentURI(for: .swift)
334330

335331
let positions = testClient.openDocument(
336332
"""
@@ -345,9 +341,8 @@ final class SwiftInterfaceTests: XCTestCase {
345341
DefinitionRequest(textDocument: TextDocumentIdentifier(uri), position: positions["1️⃣"])
346342
)
347343
let foundationLocation = try XCTUnwrap(foundationDefinition?.locations?.only)
348-
// Verify it's a swiftinterface file (can be either file:// or sourcekit-lsp:// scheme)
349344
XCTAssertTrue(foundationLocation.uri.scheme == "sourcekit-lsp")
350-
XCTAssertTrue(foundationLocation.uri.pseudoPath.hasSuffix("Foundation.swiftinterface"))
345+
XCTAssertTrue(foundationLocation.uri.pseudoPath.contains("Foundation.swiftinterface"))
351346
}
352347

353348
func testFoundationSubmoduleNavigation() async throws {

0 commit comments

Comments
 (0)