Skip to content

Commit a2a9f46

Browse files
committed
[test] simplify OutputSpan-InlineArray test
1 parent ea40837 commit a2a9f46

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

test/stdlib/Span/OutputSpanTests.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,16 @@ suite.test("InlineArray initialization")
330330
.require(.stdlib_6_2).code {
331331
guard #available(SwiftStdlib 6.2, *) else { return }
332332

333-
var a: [Int] = []
334-
335333
let i = InlineArray<10, Int> {
336334
(o: inout OutputSpan<Int>) in
337-
for _ in 0..<o.capacity {
338-
let r = Int.random(in: 10...99)
339-
a.append(r)
340-
o.append(r)
335+
expectEqual(o.count, 0)
336+
for i in 0..<o.capacity {
337+
o.append(i)
341338
}
339+
expectEqual(o.freeCapacity, 0)
342340
}
343-
expectEqual(a.count, i.count)
344341
for j in i.indices {
345-
expectEqual(a[j], i[j])
342+
expectEqual(j, i[j])
346343
}
347344
}
348345

0 commit comments

Comments
 (0)