Skip to content

Commit

Permalink
Weaken show / equality laws due to collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGregory084 committed May 17, 2022
1 parent 27a69d3 commit 6203e1a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/shared/src/test/scala/cats/tests/HashMapSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -255,17 +255,13 @@ class HashMapSuite extends CatsSuite {
forAll { (left: HashMap[Int, String], right: HashMap[Int, String]) =>
if (left.show === right.show)
assert(left === right)
else
assert(left =!= right)
}
}

property("toString consistent with equals") {
forAll { (left: HashMap[Int, String], right: HashMap[Int, String]) =>
if (left.toString == right.toString)
assertEquals(left, right)
else
assertNotEquals(left, right)
}
}
}

0 comments on commit 6203e1a

Please sign in to comment.