diff --git a/Tests/GRDBTests/FoundationDateTests.swift b/Tests/GRDBTests/FoundationDateTests.swift index 43e7a9b66..6e0a29fef 100644 --- a/Tests/GRDBTests/FoundationDateTests.swift +++ b/Tests/GRDBTests/FoundationDateTests.swift @@ -259,7 +259,7 @@ class FoundationDateTests : GRDBTestCase { XCTAssertEqual(calendar.component(.hour, from: date), 1) XCTAssertEqual(calendar.component(.minute, from: date), 2) XCTAssertEqual(calendar.component(.second, from: date), 3) - XCTAssertTrue(abs(calendar.component(.nanosecond, from: date) - 4_560_000) < 600_000) // permit precision loss down to 3 sig figs + XCTAssertTrue(abs(calendar.component(.nanosecond, from: date) - 4_560_000) < 10) } } } diff --git a/Tests/GRDBTests/FoundationNSDateTests.swift b/Tests/GRDBTests/FoundationNSDateTests.swift index 411c307ad..0b3330c5e 100644 --- a/Tests/GRDBTests/FoundationNSDateTests.swift +++ b/Tests/GRDBTests/FoundationNSDateTests.swift @@ -242,7 +242,7 @@ class FoundationNSDateTests : GRDBTestCase { XCTAssertEqual(calendar.component(.hour, from: date as Date), 1) XCTAssertEqual(calendar.component(.minute, from: date as Date), 2) XCTAssertEqual(calendar.component(.second, from: date as Date), 3) - XCTAssertTrue(abs(calendar.component(.nanosecond, from: date as Date) - 4_560_000) < 600_000) // permit precision loss down to 3 sig figs + XCTAssertTrue(abs(calendar.component(.nanosecond, from: date as Date) - 4_560_000) < 10) } } }