diff --git a/Tests/NimbleTests/Matchers/BeEmptyTest.swift b/Tests/NimbleTests/Matchers/BeEmptyTest.swift index 0677b4e72..77f7f0cb4 100644 --- a/Tests/NimbleTests/Matchers/BeEmptyTest.swift +++ b/Tests/NimbleTests/Matchers/BeEmptyTest.swift @@ -15,7 +15,7 @@ final class BeEmptyTest: XCTestCase { #if canImport(Darwin) expect(NSDictionary() as? [Int: Int]).to(beEmpty()) - expect(NSDictionary(object: 1, forKey: 1 as NSNumber) as? [Int: Int]).toNot(beEmpty()) + expect(([1: 1] as NSDictionary) as? [Int: Int]).toNot(beEmpty()) #endif expect([Int: Int]()).to(beEmpty()) diff --git a/Tests/NimbleTests/Matchers/EqualTest.swift b/Tests/NimbleTests/Matchers/EqualTest.swift index b3e3e730e..80b3eb33f 100644 --- a/Tests/NimbleTests/Matchers/EqualTest.swift +++ b/Tests/NimbleTests/Matchers/EqualTest.swift @@ -117,8 +117,8 @@ final class EqualTest: XCTestCase { expect(actual).to(equal(expected)) expect(actual).toNot(equal(unexpected)) - expect(NSDictionary(object: "bar", forKey: "foo" as NSString)).to(equal(["foo": "bar"])) - expect(NSDictionary(object: "bar", forKey: "foo" as NSString) as? [String: String]).to(equal(expected)) + expect(["foo": "bar"] as NSDictionary).to(equal(["foo": "bar"])) + expect((["foo": "bar"] as NSDictionary) as? [String: String]).to(equal(expected)) } func testDataEquality() {