Skip to content

Commit 8fc8a5e

Browse files
committed
[Foundation overlay] Minor improvements to the Measurement AnyHashable test.
1 parent fa4331b commit 8fc8a5e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

test/stdlib/TestMeasurement.swift

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)