Skip to content

Commit 18a5fc6

Browse files
authored
Merge pull request #71981 from glessard/rdar123810713
[test] guard a behavioral change
2 parents 79a71c1 + d463723 commit 18a5fc6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/stdlib/Integers.swift.gyb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,12 @@ tests.test("Strideable") {
852852
expectEqual(dist(UInt8.max, UInt8.min), -255)
853853
expectEqual(dist(Int8.min, Int8.max), 255)
854854
expectEqual(dist(Int8.max, Int8.min), -255)
855-
856-
expectEqual(Int8.min.advanced(by: Int(Int8.max)+1), 0)
857-
expectEqual(UInt.max.advanced(by: Int.min), UInt.max / 2)
855+
856+
if #available(SwiftStdlib 6.0, *) {
857+
// Edge cases fixed in Swift 6.0
858+
expectEqual(Int8.min.advanced(by: Int(Int8.max)+1), 0)
859+
expectEqual(UInt.max.advanced(by: Int.min), UInt.max / 2)
860+
}
858861
}
859862

860863
tests.test("signum/generic") {

0 commit comments

Comments
 (0)