File tree Expand file tree Collapse file tree 8 files changed +17
-17
lines changed
private/StdlibCollectionUnittest Expand file tree Collapse file tree 8 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import Foundation
17
17
import TestsUtils
18
18
19
19
func countBitSet( _ num: Int ) -> Int {
20
- let bits = sizeof ( Int) * 8
20
+ let bits = sizeof ( Int . self ) * 8
21
21
var cnt : Int = 0
22
22
var mask : Int = 1
23
23
for _ in 0 ... bits {
Original file line number Diff line number Diff line change @@ -527,7 +527,7 @@ extension TestSuite {
527
527
return makeCollectionOfEquatable(elements.map(wrapValueIntoEquatable))
528
528
}
529
529
530
- testNamePrefix += String(C.Type)
530
+ testNamePrefix += String(C.Type.self )
531
531
532
532
//===------------------------------------------------------------------===//
533
533
// generate()
@@ -1182,7 +1182,7 @@ extension TestSuite {
1182
1182
return makeCollection(elements.map(wrapValue))
1183
1183
}
1184
1184
1185
- testNamePrefix += String(C.Type)
1185
+ testNamePrefix += String(C.Type.self )
1186
1186
1187
1187
// FIXME: swift-3-indexing-model - add tests for the follow?
1188
1188
// index(before: of i: Index) -> Index
@@ -1495,7 +1495,7 @@ extension TestSuite {
1495
1495
1496
1496
addBidirectionalCollectionTests(${forwardTestArgs})
1497
1497
1498
- testNamePrefix += String(C.Type)
1498
+ testNamePrefix += String(C.Type.self )
1499
1499
1500
1500
func makeWrappedCollection(_ elements: [OpaqueValue<Int>]) -> C {
1501
1501
return makeCollection(elements.map(wrapValue))
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ extension TestSuite {
136
136
return makeCollectionOfComparable(elements.map(wrapValueIntoComparable))
137
137
}
138
138
139
- testNamePrefix += String(C.Type)
139
+ testNamePrefix += String(C.Type.self )
140
140
141
141
//===----------------------------------------------------------------------===//
142
142
// subscript(_: Index)
@@ -657,7 +657,7 @@ self.test("\(testNamePrefix).sorted/${'Predicate' if predicate else 'WhereElemen
657
657
return makeCollection(elements.map(wrapValue))
658
658
}
659
659
660
- testNamePrefix += String(C.Type)
660
+ testNamePrefix += String(C.Type.self )
661
661
662
662
//===----------------------------------------------------------------------===//
663
663
// subscript(_: Index)
@@ -783,7 +783,7 @@ self.test("\(testNamePrefix).reverse()") {
783
783
return makeCollectionOfComparable(elements.map(wrapValueIntoComparable))
784
784
}
785
785
786
- testNamePrefix += String(C.Type)
786
+ testNamePrefix += String(C.Type.self )
787
787
788
788
//===----------------------------------------------------------------------===//
789
789
// sort()
Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ extension TestSuite {
455
455
return makeCollection ( elements. map ( wrapValue) )
456
456
}
457
457
458
- testNamePrefix += String ( C . Type)
458
+ testNamePrefix += String ( C . Type. self )
459
459
460
460
//===----------------------------------------------------------------------===//
461
461
// init()
@@ -1206,7 +1206,7 @@ self.test("\(testNamePrefix).OperatorPlus") {
1206
1206
return makeCollection ( elements. map ( wrapValue) )
1207
1207
}
1208
1208
1209
- testNamePrefix += String ( C . Type)
1209
+ testNamePrefix += String ( C . Type. self )
1210
1210
1211
1211
//===----------------------------------------------------------------------===//
1212
1212
// removeLast()
@@ -1328,7 +1328,7 @@ self.test("\(testNamePrefix).removeLast(n: Int)/whereIndexIsBidirectional/remove
1328
1328
resiliencyChecks: resiliencyChecks,
1329
1329
outOfBoundsIndexOffset: outOfBoundsIndexOffset)
1330
1330
1331
- testNamePrefix += String ( C . Type)
1331
+ testNamePrefix += String ( C . Type. self )
1332
1332
1333
1333
// No extra checks for collections with random access traversal so far.
1334
1334
} // addRangeReplaceableRandomAccessCollectionTests
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ extension TestSuite {
65
65
return makeCollection ( elements. map ( wrapValue) )
66
66
}
67
67
68
- testNamePrefix += String ( C . Type)
68
+ testNamePrefix += String ( C . Type. self )
69
69
70
70
//===------------------------------------------------------------------===//
71
71
// removeFirst()
@@ -210,7 +210,7 @@ extension TestSuite {
210
210
return makeCollection ( elements. map ( wrapValue) )
211
211
}
212
212
213
- testNamePrefix += String ( C . Type)
213
+ testNamePrefix += String ( C . Type. self )
214
214
215
215
//===------------------------------------------------------------------===//
216
216
// removeLast()
@@ -351,7 +351,7 @@ extension TestSuite {
351
351
resiliencyChecks: resiliencyChecks,
352
352
outOfBoundsIndexOffset: outOfBoundsIndexOffset)
353
353
354
- testNamePrefix += String ( C . Type)
354
+ testNamePrefix += String ( C . Type. self )
355
355
356
356
// No tests yet.
357
357
} // addRangeReplaceableRandomAccessSliceTests
Original file line number Diff line number Diff line change @@ -1484,7 +1484,7 @@ extension TestSuite {
1484
1484
return makeSequenceOfEquatable ( elements. map ( wrapValueIntoEquatable) )
1485
1485
}
1486
1486
1487
- testNamePrefix += String ( S . Type)
1487
+ testNamePrefix += String ( S . Type. self )
1488
1488
1489
1489
let isMultiPass = makeSequence ( [ ] )
1490
1490
. _preprocessingPass { true } ?? false
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ final internal class _VaListBuilder {
298
298
// differs from ABI alignment on some architectures.
299
299
#if arch(arm) && !os(iOS)
300
300
if let arg = arg as? _CVarArgAligned {
301
- let alignmentInWords = arg. _cVarArgAlignment / sizeof( Int)
301
+ let alignmentInWords = arg. _cVarArgAlignment / sizeof( Int . self )
302
302
let misalignmentInWords = count % alignmentInWords
303
303
if misalignmentInWords != 0 {
304
304
let paddingInWords = alignmentInWords - misalignmentInWords
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ bb0(%0 : $BuiltinWord):
259
259
260
260
261
261
// sizeof is known to return strictly positive values
262
- // peephole: UWord(UInt64(sizeof(Int))) -> sizeof(Int)
262
+ // peephole: UWord(UInt64(sizeof(Int.self ))) -> sizeof(Int.self )
263
263
// CHECK-LABEL: sil @_TF4test29test_trunc_s_to_u_zext_sizeofFT_Su : $@convention(thin) () -> BuiltinUWord
264
264
// CHECK: builtin "sizeof"
265
265
// CHECK-NOT: builtin "zextOrBitCast_Word_Int64"
289
289
290
290
// sizeof is known to return strictly positive values
291
291
// But Word ->Int64 is not a safe conversion
292
- // No peephole for UInt16(UInt32(sizeof(Int)))
292
+ // No peephole for UInt16(UInt32(sizeof(Int.self )))
293
293
// CHECK-LABEL: sil @_TF4test35test_int16_trunc_s_to_u_zext_sizeofFT_Vs6UInt16 : $@convention(thin) () -> UInt16
294
294
// CHECK: builtin "zextOrBitCast_Word_Int64"
295
295
// CHECK: builtin "s_to_u_checked_trunc_Int64_Int32"
You can’t perform that action at this time.
0 commit comments