Skip to content

Commit f5d938a

Browse files
committed
Fix up Dictionary tests
1 parent 1859e2d commit f5d938a

File tree

2 files changed

+277
-283
lines changed

2 files changed

+277
-283
lines changed

test/stdlib/Inputs/DictionaryKeyValueTypesObjC.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,7 @@ func getBridgedNSDictionaryOfRefTypesBridgedVerbatim() -> NSDictionary {
475475
d[TestObjCKeyTy(20)] = TestObjCValueTy(1020)
476476
d[TestObjCKeyTy(30)] = TestObjCValueTy(1030)
477477

478-
let bridged =
479-
unsafeBitCast(convertDictionaryToNSDictionary(d), to: NSDictionary.self)
478+
let bridged = convertDictionaryToNSDictionary(d)
480479

481480
assert(isNativeNSDictionary(bridged))
482481

@@ -486,8 +485,7 @@ func getBridgedNSDictionaryOfRefTypesBridgedVerbatim() -> NSDictionary {
486485
func getBridgedEmptyNSDictionary() -> NSDictionary {
487486
let d = Dictionary<TestObjCKeyTy, TestObjCValueTy>()
488487

489-
let bridged =
490-
unsafeBitCast(convertDictionaryToNSDictionary(d), to: NSDictionary.self)
488+
let bridged = convertDictionaryToNSDictionary(d)
491489
assert(isNativeNSDictionary(bridged))
492490

493491
return bridged
@@ -874,8 +872,7 @@ typealias AnyObjectTuple2 = (AnyObject, AnyObject)
874872
for i in 0..<3 {
875873
var actualContents = [ExpectedDictionaryElement]()
876874
let sink: (AnyObjectTuple2) -> Void = {
877-
pair in
878-
let (key, value) = pair
875+
let (key, value) = $0
879876
actualContents.append(ExpectedDictionaryElement(
880877
key: convertKey(key),
881878
value: convertValue(value),

0 commit comments

Comments
 (0)