@@ -185,7 +185,7 @@ final class JSONTests: XCTestCase {
185
185
private func assertRoundTrip< T: Codable & Equatable > (
186
186
of value: T ,
187
187
expectedJSON: String ,
188
- file: StaticString = #file ,
188
+ file: StaticString = #filePath ,
189
189
line: UInt = #line
190
190
) {
191
191
let payload : [ UInt8 ]
@@ -214,7 +214,7 @@ final class JSONTests: XCTestCase {
214
214
private func assertRoundTripTypeCoercionFailure< T: Codable , U: Codable > (
215
215
of value: T ,
216
216
as type: U . Type ,
217
- file: StaticString = #file ,
217
+ file: StaticString = #filePath ,
218
218
line: UInt = #line
219
219
) {
220
220
do {
@@ -228,15 +228,15 @@ final class JSONTests: XCTestCase {
228
228
}
229
229
}
230
230
231
- private func assertInvalidStrng( _ json: String , file: StaticString = #file , line: UInt = #line) {
231
+ private func assertInvalidStrng( _ json: String , file: StaticString = #filePath , line: UInt = #line) {
232
232
do {
233
233
var json = json
234
234
_ = try json. withUTF8 { try JSON . decode ( String . self, from: $0) }
235
235
XCTFail ( " decoding should fail " , file: file, line: line)
236
236
} catch { }
237
237
}
238
238
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) {
240
240
do {
241
241
var json = json
242
242
_ = try json. withUTF8 { try JSON . decode ( Bool . self, from: $0) }
0 commit comments