Skip to content

Commit a402ee0

Browse files
authored
Merge pull request #1524 from swiftlang/automerge/merge-main-2025-09-26_09-04
Merge `main` into `future`
2 parents e6dfded + 57b6c0c commit a402ee0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tests/FoundationEssentialsTests/JSONEncoderTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2621,7 +2621,10 @@ extension JSONEncoderTests {
26212621
func _run_json5SpecTest<T:Decodable>(_ category: String, _ name: String, testType: JSON5SpecTestType, type: T.Type, sourceLocation: SourceLocation = #_sourceLocation) {
26222622
let subdirectory = "/JSON5/spec/\(category)"
26232623
let ext = testType.fileExtension
2624-
let jsonData = testData(forResource: name, withExtension: ext, subdirectory: subdirectory)!
2624+
guard let jsonData = testData(forResource: name, withExtension: ext, subdirectory: subdirectory) else {
2625+
Issue.record("Failed to load test data forResource: \(name), withExtension: \(ext), subdirectory: \(subdirectory)", sourceLocation: sourceLocation)
2626+
return
2627+
}
26252628

26262629
let json5 = json5Decoder
26272630
let json = JSONDecoder()

0 commit comments

Comments
 (0)