@@ -104,7 +104,7 @@ final class SwiftInterfaceTests: XCTestCase {
104
104
uri: project. fileURI,
105
105
position: project. positions [ " 3️⃣ " ] ,
106
106
testClient: project. testClient,
107
- swiftInterfaceFile : " _Concurrency.swiftinterface " ,
107
+ swiftInterfaceFiles : [ " Swift.swiftinterface " , " _Concurrency.swiftinterface " ] ,
108
108
linePrefix: " @inlinable public func withTaskGroup "
109
109
)
110
110
}
@@ -387,6 +387,27 @@ private func assertSystemSwiftInterface(
387
387
swiftInterfaceFile: String ,
388
388
linePrefix: String ,
389
389
line: UInt = #line
390
+ ) async throws {
391
+ try await assertSystemSwiftInterface (
392
+ uri: uri,
393
+ position: position,
394
+ testClient: testClient,
395
+ swiftInterfaceFiles: [ swiftInterfaceFile] ,
396
+ linePrefix: linePrefix,
397
+ line: line
398
+ )
399
+ }
400
+
401
+ #if compiler(>=6.4)
402
+ @available ( * , deprecated, message: " temporary workaround for '_Concurrency.swiftinterface' should no longer be necessary " )
403
+ #endif
404
+ private func assertSystemSwiftInterface(
405
+ uri: DocumentURI ,
406
+ position: Position ,
407
+ testClient: TestSourceKitLSPClient ,
408
+ swiftInterfaceFiles: [ String ] ,
409
+ linePrefix: String ,
410
+ line: UInt = #line
390
411
) async throws {
391
412
let definition = try await testClient. send (
392
413
DefinitionRequest (
@@ -395,10 +416,9 @@ private func assertSystemSwiftInterface(
395
416
)
396
417
)
397
418
let location = try XCTUnwrap ( definition? . locations? . only)
398
- XCTAssertEqual (
399
- location. uri. fileURL? . lastPathComponent,
400
- swiftInterfaceFile,
401
- " Path was: ' \( location. uri. pseudoPath) ' " ,
419
+ XCTAssert (
420
+ ( location. uri. fileURL? . lastPathComponent) . map ( swiftInterfaceFiles. contains) ?? false ,
421
+ " Path ' \( location. uri. pseudoPath) ' did not match any of \( String ( reflecting: swiftInterfaceFiles) ) " ,
402
422
line: line
403
423
)
404
424
// load contents of swiftinterface
0 commit comments