Closed guojiex closed 2 years ago
func TestContainsKey(t *testing.T) { Convey("Test IntersectMapsByKey", t, func() { map1 := map[int64]bool{ 1: true, } So(map1, ShouldContainKey, int64(1)) So(map1, ShouldContainKey, 1) }) }
the first assertion passed, while the second one will fail, error msg:
Expected the map[int64]bool to contain the key: [1] (but it didn't)!
My current temp solution will be:
So(map1[1], ShouldBeTrue)
This should be a problem of https://github.com/smartystreets/assertions, I will open a bug there.
the first assertion passed, while the second one will fail, error msg:
Expected the map[int64]bool to contain the key: [1] (but it didn't)!
My current temp solution will be:
So(map1[1], ShouldBeTrue)