@@ -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,31 @@ 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 (
403
+ * ,
404
+ deprecated,
405
+ message: " temporary workaround for '_Concurrency.swiftinterface' should no longer be necessary "
406
+ )
407
+ #endif
408
+ private func assertSystemSwiftInterface(
409
+ uri: DocumentURI ,
410
+ position: Position ,
411
+ testClient: TestSourceKitLSPClient ,
412
+ swiftInterfaceFiles: [ String ] ,
413
+ linePrefix: String ,
414
+ line: UInt = #line
390
415
) async throws {
391
416
let definition = try await testClient. send (
392
417
DefinitionRequest (
@@ -395,10 +420,9 @@ private func assertSystemSwiftInterface(
395
420
)
396
421
)
397
422
let location = try XCTUnwrap ( definition? . locations? . only)
398
- XCTAssertEqual (
399
- location. uri. fileURL? . lastPathComponent,
400
- swiftInterfaceFile,
401
- " Path was: ' \( location. uri. pseudoPath) ' " ,
423
+ XCTAssert (
424
+ ( location. uri. fileURL? . lastPathComponent) . map ( swiftInterfaceFiles. contains) ?? false ,
425
+ " Path ' \( location. uri. pseudoPath) ' did not match any of \( String ( reflecting: swiftInterfaceFiles) ) " ,
402
426
line: line
403
427
)
404
428
// load contents of swiftinterface
0 commit comments