@@ -222,9 +222,9 @@ self.test("\(testNamePrefix)._withUnsafeMutableBufferPointerIfSupported()/semant
222
222
for test in subscriptRangeTests {
223
223
var c = makeWrappedCollection(test.collection)
224
224
var result = c._withUnsafeMutableBufferPointerIfSupported {
225
- (baseAddress, length ) -> OpaqueValue<Array<OpaqueValue<Int>>> in
225
+ (baseAddress, count ) -> OpaqueValue<Array<OpaqueValue<Int>>> in
226
226
let bufferPointer =
227
- UnsafeMutableBufferPointer(start: baseAddress, length: length )
227
+ UnsafeMutableBufferPointer(start: baseAddress, count: count )
228
228
return OpaqueValue(Array(bufferPointer.map(extractValue)))
229
229
}
230
230
expectType(Optional<OpaqueValue<Array<OpaqueValue<Int>>>>.self, &result)
@@ -246,13 +246,13 @@ self.test("\(testNamePrefix).sorted/DispatchesThrough_withUnsafeMutableBufferPoi
246
246
let sequence = [ 5, 4, 3, 2, 1 ]
247
247
% if predicate:
248
248
let elements: [OpaqueValue<Int>] =
249
- zip(sequence, 0..<sequence.length ).map {
249
+ zip(sequence, 0..<sequence.count ).map {
250
250
OpaqueValue($0, identity: $1)
251
251
}
252
252
let c = makeWrappedCollection(elements)
253
253
% else:
254
254
let elements: [MinimalComparableValue] =
255
- zip(sequence, 0..<sequence.length ).map {
255
+ zip(sequence, 0..<sequence.count ).map {
256
256
MinimalComparableValue($0, identity: $1)
257
257
}
258
258
let c = makeWrappedCollectionWithComparableElement(elements)
@@ -288,7 +288,7 @@ func checkSort_${'Predicate' if predicate else 'WhereElementIsComparable'}(
288
288
% if predicate:
289
289
let extract = extractValue
290
290
let elements: [OpaqueValue<Int>] =
291
- zip(sequence, 0..<sequence.length ).map {
291
+ zip(sequence, 0..<sequence.count ).map {
292
292
OpaqueValue($0, identity: $1)
293
293
}
294
294
let c = makeWrappedCollection(elements)
@@ -304,7 +304,7 @@ func checkSort_${'Predicate' if predicate else 'WhereElementIsComparable'}(
304
304
305
305
let extract = extractValueFromComparable
306
306
let elements: [MinimalComparableValue] =
307
- zip(sequence, 0..<sequence.length ).map {
307
+ zip(sequence, 0..<sequence.count ).map {
308
308
MinimalComparableValue($0, identity: $1)
309
309
}
310
310
let c = makeWrappedCollectionWithComparableElement(elements)
@@ -320,7 +320,7 @@ func checkSort_${'Predicate' if predicate else 'WhereElementIsComparable'}(
320
320
321
321
// Check that we didn't lose any elements.
322
322
expectEqualsUnordered(
323
- 0..<sequence.length ,
323
+ 0..<sequence.count ,
324
324
extractedResult.map { $0.identity })
325
325
326
326
// Check that the elements are sorted.
@@ -589,7 +589,7 @@ func checkSortInPlace_${'Predicate' if predicate else 'WhereElementIsComparable'
589
589
% if predicate:
590
590
let extract = extractValue
591
591
let elements: [OpaqueValue<Int>] =
592
- zip(sequence, 0..<sequence.length ).map {
592
+ zip(sequence, 0..<sequence.count ).map {
593
593
OpaqueValue($0, identity: $1)
594
594
}
595
595
@@ -606,7 +606,7 @@ func checkSortInPlace_${'Predicate' if predicate else 'WhereElementIsComparable'
606
606
607
607
let extract = extractValueFromComparable
608
608
let elements: [MinimalComparableValue] =
609
- zip(sequence, 0..<sequence.length ).map {
609
+ zip(sequence, 0..<sequence.count ).map {
610
610
MinimalComparableValue($0, identity: $1)
611
611
}
612
612
@@ -618,7 +618,7 @@ func checkSortInPlace_${'Predicate' if predicate else 'WhereElementIsComparable'
618
618
619
619
// Check that we didn't lose any elements.
620
620
expectEqualsUnordered(
621
- 0..<sequence.length ,
621
+ 0..<sequence.count ,
622
622
extractedResult.map { $0.identity })
623
623
624
624
// Check that the elements are sorted.
@@ -679,7 +679,7 @@ func checkPartition_${'Predicate' if predicate else 'WhereElementIsComparable'}(
679
679
% if predicate:
680
680
let extract = extractValue
681
681
let elements: [OpaqueValue<Int>] =
682
- zip(sequence, 0..<sequence.length ).map {
682
+ zip(sequence, 0..<sequence.count ).map {
683
683
OpaqueValue($0, identity: $1)
684
684
}
685
685
@@ -690,7 +690,7 @@ func checkPartition_${'Predicate' if predicate else 'WhereElementIsComparable'}(
690
690
691
691
let extract = extractValueFromComparable
692
692
let elements: [MinimalComparableValue] =
693
- zip(sequence, 0..<sequence.length ).map {
693
+ zip(sequence, 0..<sequence.count ).map {
694
694
MinimalComparableValue($0, identity: $1)
695
695
}
696
696
@@ -710,7 +710,7 @@ func checkPartition_${'Predicate' if predicate else 'WhereElementIsComparable'}(
710
710
711
711
// Check that we didn't lose any elements.
712
712
let identities = c.map { extract($0).identity }
713
- expectEqualsUnordered(0..<sequence.length , identities)
713
+ expectEqualsUnordered(0..<sequence.count , identities)
714
714
715
715
if verifyOrder {
716
716
// All the elements in the first partition are less than the pivot
@@ -760,14 +760,14 @@ self.test("\(testNamePrefix).partition/DispatchesThrough_withUnsafeMutableBuffer
760
760
% if predicate:
761
761
let extract = extractValue
762
762
let elements: [OpaqueValue<Int>] =
763
- zip(sequence, 0..<sequence.length ).map {
763
+ zip(sequence, 0..<sequence.count ).map {
764
764
OpaqueValue($0, identity: $1)
765
765
}
766
766
let c = makeWrappedCollection(elements)
767
767
% else:
768
768
let extract = extractValueFromComparable
769
769
let elements: [MinimalComparableValue] =
770
- zip(sequence, 0..<sequence.length ).map {
770
+ zip(sequence, 0..<sequence.count ).map {
771
771
MinimalComparableValue($0, identity: $1)
772
772
}
773
773
let c = makeWrappedCollectionWithComparableElement(elements)
0 commit comments