Skip to content

Commit f45df0b

Browse files
committed
Fix tests compilation for Swift 5.8-5.10 on Linux
1 parent e3c19e6 commit f45df0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/JSONLoggerTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ final class JSONLoggerTests : XCTestCase {
1212
public static let defaultJSONDecoder: JSONDecoder = {
1313
let res = JSONDecoder()
1414
if #available(macOS 12.0, tvOS 15.0, iOS 15.0, watchOS 8.0, *) {
15+
#if canImport(Darwin) || compiler(>=6)
1516
res.allowsJSON5 = false
17+
#endif
1618
}
1719
res.keyDecodingStrategy = .useDefaultKeys
1820
res.dateDecodingStrategy = .iso8601
1921
res.dataDecodingStrategy = .base64
2022
if #available(macOS 12.0, tvOS 15.0, iOS 15.0, watchOS 8.0, *) {
23+
#if canImport(Darwin) || compiler(>=6)
2124
res.assumesTopLevelDictionary = false
25+
#endif
2226
}
2327
res.nonConformingFloatDecodingStrategy = .throw
2428
return res

0 commit comments

Comments
 (0)