@@ -115,26 +115,26 @@ ArrayTestSuite.test("valueDestruction") {
115
115
116
116
ArrayTestSuite.test("capacity/reserveCapacity(_:)") {
117
117
var a1 = [1010, 1020, 1030]
118
- expectEqual(3, a1.capacity)
118
+ expectGE( a1.capacity, 3 )
119
119
a1.append(1040)
120
- expectEqual(6, a1.capacity)
120
+ expectGT( a1.capacity, 3 )
121
121
122
122
// Reserving new capacity jumps up to next limit.
123
123
a1.reserveCapacity(7)
124
- expectEqual(8, a1.capacity)
124
+ expectGE( a1.capacity, 7 )
125
125
126
126
// Can reserve right up to a limit.
127
127
a1.reserveCapacity(24)
128
- expectEqual(24, a1.capacity)
128
+ expectGE( a1.capacity, 24 )
129
129
130
130
// Fill up to the limit, no reallocation.
131
131
for v in stride(from: 50, through: 240, by: 10).lazy.map({ 1000 + $0 }) {
132
132
a1.append(v)
133
133
}
134
134
expectEqual(24, a1.count)
135
- expectEqual(24, a1.capacity)
135
+ expectGE( a1.capacity, 24 )
136
136
a1.append(1250)
137
- expectEqual(48, a1.capacity)
137
+ expectGT( a1.capacity, 24 )
138
138
}
139
139
140
140
ArrayTestSuite.test("init(arrayLiteral:)") {
0 commit comments