We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56c6887 commit 71b6d99Copy full SHA for 71b6d99
validation-test/stdlib/UnsafeBufferPointerSlices.swift
@@ -280,10 +280,12 @@ UnsafeMutableBufferPointerSliceTests.test(
280
281
var a = UnsafeMutableBufferPointer<String>.allocate(capacity: c)
282
defer { a.deallocate() }
283
- a.initialize(fromContentsOf: Array(repeating: ".", count: c))
+ var i: Int? = a.initialize(fromContentsOf: Array(repeating: ".", count: c))
284
defer { a.deinitialize() }
285
+ expectEqual(i, c)
286
+ expectTrue(a.allSatisfy({ $0 == "." }))
287
- var i = a.withContiguousMutableStorageIfAvailable {
288
+ i = a.withContiguousMutableStorageIfAvailable {
289
$0.update(fromContentsOf: Array(repeating: " ", count: c))
290
}
291
expectEqual(i, c)
0 commit comments