Skip to content

Commit

Permalink
check the empty case in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nasadorian committed Nov 2, 2018
1 parent b823aab commit 1cd917e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/src/test/scala/cats/tests/NonEmptyMapSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ class NonEmptyMapSuite extends CatsSuite {
forAll { (nem: NonEmptyMap[String, Int], i: (String, Int)) =>
nem.add(i) should ===(nem.add(i).updateWith(i._1, identity))
nem.add(i).lookup(i._1).map(_ + 1) should ===(nem.add(i).updateWith(i._1, _ + 1).lookup(i._1))
nem.lookup(i._1) should ===(nem.updateWith(i._1, _ => i._2).lookup(i._1))
}
}
}

0 comments on commit 1cd917e

Please sign in to comment.