Skip to content

Commit b722727

Browse files
committed
Fix build warnings in tests
1 parent c18e9ca commit b722727

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Tests/SwiftCompilerPluginTest/JSONTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ final class JSONTests: XCTestCase {
185185
private func assertRoundTrip<T: Codable & Equatable>(
186186
of value: T,
187187
expectedJSON: String,
188-
file: StaticString = #file,
188+
file: StaticString = #filePath,
189189
line: UInt = #line
190190
) {
191191
let payload: [UInt8]
@@ -214,7 +214,7 @@ final class JSONTests: XCTestCase {
214214
private func assertRoundTripTypeCoercionFailure<T: Codable, U: Codable>(
215215
of value: T,
216216
as type: U.Type,
217-
file: StaticString = #file,
217+
file: StaticString = #filePath,
218218
line: UInt = #line
219219
) {
220220
do {
@@ -228,15 +228,15 @@ final class JSONTests: XCTestCase {
228228
}
229229
}
230230

231-
private func assertInvalidStrng(_ json: String, file: StaticString = #file, line: UInt = #line) {
231+
private func assertInvalidStrng(_ json: String, file: StaticString = #filePath, line: UInt = #line) {
232232
do {
233233
var json = json
234234
_ = try json.withUTF8 { try JSON.decode(String.self, from: $0) }
235235
XCTFail("decoding should fail", file: file, line: line)
236236
} catch {}
237237
}
238238

239-
private func assertParseError(_ json: String, message: String, file: StaticString = #file, line: UInt = #line) {
239+
private func assertParseError(_ json: String, message: String, file: StaticString = #filePath, line: UInt = #line) {
240240
do {
241241
var json = json
242242
_ = try json.withUTF8 { try JSON.decode(Bool.self, from: $0) }

Tests/SwiftParserTest/ParserTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ class ParserTests: ParserTestCase {
7070
|| $0.pathExtension == "sil"
7171
|| $0.pathExtension == "swiftinterface"
7272
}
73-
#if swift(>=6.0)
73+
#if swift(>=6.0) && !canImport(Darwin)
74+
// URL is not marked as Sendable in corelibs-foundation
7475
nonisolated(unsafe) let fileURLs = _fileURLs
7576
#else
7677
let fileURLs = _fileURLs

0 commit comments

Comments
 (0)