@@ -46,27 +46,6 @@ struct SplitMix64: RandomNumberGenerator {
46
46
}
47
47
}
48
48
49
- // An eraser helper to any hashable sequence.
50
- struct AnyHashableSequence < Base>
51
- where Base: Sequence , Base: Hashable {
52
- var base : Base
53
- }
54
-
55
- extension AnyHashableSequence : Hashable { }
56
- extension AnyHashableSequence : Sequence {
57
- typealias Iterator = Base . Iterator
58
-
59
- func makeIterator( ) -> Iterator {
60
- base. makeIterator ( )
61
- }
62
- }
63
-
64
- extension Sequence where Self: Hashable {
65
- func eraseToAnyHashableSequence( ) -> AnyHashableSequence < Self > {
66
- AnyHashableSequence ( base: self )
67
- }
68
- }
69
-
70
49
// An eraser helper to any mutable collection
71
50
struct AnyMutableCollection < Base> where Base: MutableCollection {
72
51
var base : Base
@@ -184,38 +163,6 @@ func XCTAssertEqualCollections<C1: Collection, C2: Collection>(
184
163
}
185
164
}
186
165
187
- func hash< T: Hashable > ( _ value: T ) -> Int {
188
- var hasher = Hasher ( )
189
- value. hash ( into: & hasher)
190
- return hasher. finalize ( )
191
- }
192
-
193
- /// Asserts that two hashable instances produce the same hash value.
194
- func XCTAssertEqualHashValue< T: Hashable , U: Hashable > (
195
- _ expression1: @autoclosure ( ) throws -> T ,
196
- _ expression2: @autoclosure ( ) throws -> U ,
197
- _ message: @autoclosure ( ) -> String = " " ,
198
- file: StaticString = #file, line: UInt = #line
199
- ) {
200
- XCTAssertEqual (
201
- hash ( try expression1 ( ) ) , hash ( try expression2 ( ) ) ,
202
- message ( ) , file: file, line: line
203
- )
204
- }
205
-
206
- /// Asserts that two hashable instances don't produce the same hash value.
207
- func XCTAssertNotEqualHashValue< T: Hashable , U: Hashable > (
208
- _ expression1: @autoclosure ( ) throws -> T ,
209
- _ expression2: @autoclosure ( ) throws -> U ,
210
- _ message: @autoclosure ( ) -> String = " " ,
211
- file: StaticString = #file, line: UInt = #line
212
- ) {
213
- XCTAssertNotEqual (
214
- hash ( try expression1 ( ) ) , hash ( try expression2 ( ) ) ,
215
- message ( ) , file: file, line: line
216
- )
217
- }
218
-
219
166
/// Tests that all index traversal methods behave as expected.
220
167
///
221
168
/// Verifies the correctness of the implementations of `startIndex`, `endIndex`,
0 commit comments