diff --git a/Tests/CollectionsTestSupportTests/UtilitiesTests.swift b/Tests/CollectionsTestSupportTests/UtilitiesTests.swift index b0038980..ae64f2b9 100644 --- a/Tests/CollectionsTestSupportTests/UtilitiesTests.swift +++ b/Tests/CollectionsTestSupportTests/UtilitiesTests.swift @@ -21,7 +21,10 @@ final class UtilitiesTests: CollectionTestCase { withSome("i", in: 0 ..< Int.max, maxSamples: 100_000) { i in let s = i._squareRoot() expectLessThanOrEqual(s * s, i) - expectGreaterThan((s + 1) * (s + 1), i) + let next = (s + 1).multipliedReportingOverflow(by: s + 1) + if !next.overflow { + expectGreaterThan(next.partialValue, i) + } } } }