Skip to content

Commit 66852e2

Browse files
committed
tests: fix Array test
The Array/removeNonUnique test is not working with an old runtime. rdar://problem/58471030
1 parent 946eee9 commit 66852e2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/stdlib/Inputs/CommonArrayTests.gyb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ ${Suite}.test("${ArrayType}/appendNonUnique")
116116
% if ArrayType != 'ArraySlice':
117117
${Suite}.test("${ArrayType}/removeNonUnique")
118118
.code {
119-
var x = ${ArrayType}<Int>(repeating: 27, count: 200)
120-
x.reserveCapacity(10002)
121-
for _ in 1...100 {
122-
let y = x
123-
x.remove(at: 0)
124-
expectTrue(x.capacity < 1000)
119+
if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
120+
var x = ${ArrayType}<Int>(repeating: 27, count: 200)
121+
x.reserveCapacity(10002)
122+
for _ in 1...100 {
123+
let y = x
124+
x.remove(at: 0)
125+
expectTrue(x.capacity < 1000)
126+
}
125127
}
126128
}
127129
% end

0 commit comments

Comments
 (0)