algolia / instantsearch-core-swift

⚡️ InstantSearch Core library for Swift and Objective-C
https://community.algolia.com/instantsearch-core-swift/
Apache License 2.0
18 stars 10 forks source link

Compare Dictionary.Keys directly, without creating array #26

Closed XiaowenVC closed 6 years ago

XiaowenVC commented 6 years ago

Resolve issue #25

robertmogos commented 6 years ago

Could you please update the test in SearchParametersTest so we can properly test this. Thanks

func testEquality() {
        let params1 = SearchParameters()
        params1.addFacetRefinement(name: "boo", value: "barry")
        params1.addFacetRefinement(name: "foo", value: "bar")
        let params2 = SearchParameters()
        params2.addFacetRefinement(name: "foo", value: "bar")
        params2.addFacetRefinement(name: "boo", value: "barry")
        XCTAssertEqual(params1, params2)
    }