Skip to content

Commit a6d1336

Browse files
committed
Foundation: add tests for associated types on Data
1 parent 75fb174 commit a6d1336

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

validation-test/stdlib/Data.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,17 @@ DataTestSuite.test("Data.Iterator semantics") {
2929
}
3030
checkSequence((0..<65535).lazy.map({ UInt8($0 % 23) }), data)
3131
}
32+
33+
DataTestSuite.test("associated types") {
34+
typealias Subject = Data
35+
expectRandomAccessCollectionAssociatedTypes(
36+
collectionType: Subject.self,
37+
iteratorType: Data.Iterator.self,
38+
subSequenceType: MutableRangeReplaceableRandomAccessSlice<Subject>.self,
39+
indexType: Int.self,
40+
indexDistanceType: Int.self,
41+
indicesType: CountableRange<Int>.self)
42+
}
43+
44+
3245
runAllTests()

0 commit comments

Comments
 (0)