Fix formatting in tests

This commit is contained in:
Natik Gadzhi 2023-06-22 21:40:11 -07:00
parent e0ce4e8da3
commit d0bd9aac07
No known key found for this signature in database
GPG Key ID: E6387D41B53DEE06
1 changed files with 8 additions and 10 deletions

View File

@ -97,7 +97,7 @@ class MetricsExtensionsTests: XCTestCase {
}
func testTimerDuration() throws {
#if swift(>=5.7)
#if swift(>=5.7)
guard #available(iOS 16, macOS 13, tvOS 15, watchOS 8, *) else {
return
}
@ -106,7 +106,7 @@ class MetricsExtensionsTests: XCTestCase {
MetricsSystem.bootstrapInternal(metrics)
let name = "timer-\(UUID().uuidString)"
let duration = Duration(secondsComponent: 3, attosecondsComponent: 123000000000000000)
let duration = Duration(secondsComponent: 3, attosecondsComponent: 123_000_000_000_000_000)
let durationInNanoseconds = duration.components.seconds * 1_000_000_000 + duration.components.attoseconds / 1_000_000_000
let timer = Timer(label: name)
@ -116,11 +116,9 @@ class MetricsExtensionsTests: XCTestCase {
XCTAssertEqual(testTimer.values.count, 1, "expected number of entries to match")
XCTAssertEqual(testTimer.values.first, durationInNanoseconds, "expected value to match")
XCTAssertEqual(metrics.timers.count, 1, "timer should have been stored")
#endif
#endif
}
func testTimerUnits() throws {
let metrics = TestMetrics()
MetricsSystem.bootstrapInternal(metrics)