Skip to content

Commit 557d38d

Browse files
committed
Fix tests compilation for Swift 5.7
1 parent 8906c1d commit 557d38d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/LinuxMain.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import XCTest
55

66

77

8-
let testWhenAvailable1: [(String, (XCTestCase) -> () -> Void)]
8+
let tests_swift57_JSONLoggerTests: [(String, (JSONLoggerTests) -> () throws -> Void)]
99
#if swift(>=5.7)
10-
testWhenAvailable1 = [
10+
tests_swift57_JSONLoggerTests = [
1111
("testEncodeMetadataAsJSON", JSONLoggerTests.testEncodeMetadataAsJSON),
1212
]
1313
#else
14-
testWhenAvailable1 = []
14+
tests_swift57_JSONLoggerTests = []
1515
#endif
1616
var tests: [XCTestCaseEntry] = [
1717
testCase([
@@ -21,7 +21,7 @@ var tests: [XCTestCaseEntry] = [
2121
("testFallbackOnLogLineEncodeFailure", JSONLoggerTests.testFallbackOnLogLineEncodeFailure),
2222
("testDecodeLogLineWithBothValidDateAndMangledDate", JSONLoggerTests.testDecodeLogLineWithBothValidDateAndMangledDate),
2323
("testDecodeLogLineWithBothInvalidDateAndMangledDate", JSONLoggerTests.testDecodeLogLineWithBothInvalidDateAndMangledDate),
24-
] + testWhenAvailable1),
24+
] + tests_swift57_JSONLoggerTests),
2525
]
2626
#if !os(WASI)
2727
XCTMain(tests)

0 commit comments

Comments
 (0)