Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Mar 10, 2016
1 parent 651046d commit 6bbb05c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/test/scala/cats/tests/FoldableTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ class FoldableTestsAdditional extends CatsSuite {
// more basic checks
val names = List("Aaron", "Betty", "Calvin", "Deirdra")
F.foldMap(names)(_.length) should === (names.map(_.length).sum)
val sumM = F.foldM(names, "") { (acc, x) => (Some(acc + x): Option[String]) }
val sumM = F.foldM(names, Eval.later { "" }) { (acc, x) => (Some(acc + x): Option[String]) }
assert(sumM == Some("AaronBettyCalvinDeirdra"))
val notCalvin = F.foldM(names, "") { (acc, x) =>
val notCalvin = F.foldM(names, Eval.later { "" }) { (acc, x) =>
if (x == "Calvin") (None: Option[String])
else (Some(acc + x): Option[String]) }
assert(notCalvin == None)
Expand Down

0 comments on commit 6bbb05c

Please sign in to comment.