Skip to content

Commit e059cc6

Browse files
authored
Merge pull request #42147 from glessard/sr15994
[test] check availability before executing test
2 parents 75b5c54 + 3bacc7c commit e059cc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

validation-test/stdlib/UnsafeBufferPointer.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ ${SelfName}TestSuite.test("nilBaseAddress") {
181181

182182
% if IsMutable:
183183
${SelfName}TestSuite.test("copyFromEmptyBuffer") {
184+
guard #available(SwiftStdlib 5.7, *) else { return }
185+
184186
% if IsRaw:
185187
var memory: UnsafeMutableRawPointer
186188
let empty = UnsafeRawBufferPointer(start: nil, count: 0)
@@ -453,9 +455,7 @@ UnsafeMutableBufferPointerTestSuite.test("Slice.withContiguousStorageIfAvailable
453455
}
454456

455457
UnsafeMutableRawBufferPointerTestSuite.test("Slice.withContiguousStorageIfAvailable") {
456-
guard #available(SwiftStdlib 5.7, *) else {
457-
return
458-
}
458+
guard #available(SwiftStdlib 5.7, *) else { return }
459459

460460
for test in subscriptRangeTests {
461461
let c = test.collection.map({ UInt8($0.value/1000) })

0 commit comments

Comments
 (0)