@@ -163,19 +163,17 @@ class TestMeasurement : TestMeasurementSuper {
163163 }
164164
165165 func test_AnyHashableCreatedFromNSMeasurement( ) {
166- if #available( iOS 8 . 0 , * ) {
167- let values : [ NSMeasurement ] = [
168- NSMeasurement ( doubleValue: 100 , unit: UnitLength . meters) ,
169- NSMeasurement ( doubleValue: 100 , unit: UnitLength . kilometers) ,
170- NSMeasurement ( doubleValue: 100 , unit: UnitLength . kilometers) ,
171- ]
172- let anyHashables = values. map ( AnyHashable . init)
173- expectEqual ( Measurement . self, type ( of: anyHashables [ 0 ] . base) )
174- expectEqual ( Measurement . self, type ( of: anyHashables [ 1 ] . base) )
175- expectEqual ( Measurement . self, type ( of: anyHashables [ 2 ] . base) )
176- expectNotEqual ( anyHashables [ 0 ] , anyHashables [ 1 ] )
177- expectEqual ( anyHashables [ 1 ] , anyHashables [ 2 ] )
178- }
166+ let values : [ NSMeasurement ] = [
167+ NSMeasurement ( doubleValue: 100 , unit: UnitLength . meters) ,
168+ NSMeasurement ( doubleValue: 100 , unit: UnitLength . kilometers) ,
169+ NSMeasurement ( doubleValue: 100 , unit: UnitLength . kilometers) ,
170+ ]
171+ let anyHashables = values. map ( AnyHashable . init)
172+ expectEqual ( Measurement< Unit> . self , type ( of: anyHashables [ 0 ] . base) )
173+ expectEqual ( Measurement< Unit> . self , type ( of: anyHashables [ 1 ] . base) )
174+ expectEqual ( Measurement< Unit> . self , type ( of: anyHashables [ 2 ] . base) )
175+ expectNotEqual ( anyHashables [ 0 ] , anyHashables [ 1 ] )
176+ expectEqual ( anyHashables [ 1 ] , anyHashables [ 2 ] )
179177 }
180178}
181179
0 commit comments