Skip to content

Commit 0e886ce

Browse files
committed
stdlib: String tests: use expectCollectionAssociatedTypes()
1 parent 5564f94 commit 0e886ce

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

validation-test/stdlib/CollectionType.swift.gyb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -819,11 +819,14 @@ struct ${Self}<T> : ${Collection} {
819819
}
820820

821821
CollectionTypeTests.test("AssociatedTypes/${Collection}") {
822-
expectTrue(${Self}<Void>.Index.self == FatalIndex.self)
823-
expectTrue(${Self}<Void>.Indices.self == ${Indices}<${Self}<Void>>.self)
824-
expectTrue(${Self}<Void>.IndexDistance.self == Int.self)
825-
expectTrue(${Self}<Void>.Iterator.self == IndexingIterator<${Self}<Void>>.self)
826-
expectTrue(${Self}<Void>.SubSequence.self == ${Slice}<${Self}<Void>>.self)
822+
typealias C = ${Self}<Void>
823+
expectCollectionAssociatedTypes(
824+
collectionType: C.self,
825+
iteratorType: IndexingIterator<C>.self,
826+
subSequenceType: ${Slice}<C>.self,
827+
indexType: FatalIndex.self,
828+
indexDistanceType: Int.self,
829+
indicesType: ${Indices}<C>.self)
827830
}
828831
% end
829832

0 commit comments

Comments
 (0)