diff --git a/Tests/MetricsTests/MetricsTests.swift b/Tests/MetricsTests/MetricsTests.swift index 6a9d323..0880a19 100644 --- a/Tests/MetricsTests/MetricsTests.swift +++ b/Tests/MetricsTests/MetricsTests.swift @@ -101,7 +101,7 @@ class MetricsExtensionsTests: XCTestCase { // tests on Linux in MetricsTests+XCTest don't complain that the func does not exist. #if swift(>=5.7) guard #available(iOS 16, macOS 13, tvOS 15, watchOS 8, *) else { - throw XCTSkip("Timer.record(_ duration: Duration) is available on Swift 5.7+") + throw XCTSkip("Timer.record(_ duration: Duration) is not available on this platform") } let metrics = TestMetrics() @@ -123,6 +123,8 @@ class MetricsExtensionsTests: XCTestCase { XCTAssertEqual(testTimer.values.first, nanoseconds, "expected value to match") XCTAssertEqual(testTimer.values[1], Int64.max, "expected to record Int64.max if Durataion overflows") XCTAssertEqual(metrics.timers.count, 1, "timer should have been stored") + #else + throw XCTSkip("Timer.record(_ duration: Duration) is only available on Swift >=5.7") #endif }