Skip to content

Commit

Permalink
Fix duplicate test names
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Aug 19, 2019
1 parent 6f8658b commit 67dc634
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ trait ScalaVersionSpecificFoldableSuite { self: FoldableSuiteAdditional =>
Foldable[LazyList].foldRight(fa, lb)(f)
}

test(".foldLeftM short-circuiting") {
test("Foldable[LazyList].foldLeftM short-circuiting") {
implicit val F = foldableLazyListWithDefaultImpl
val ns = LazyList.continually(1)
val res = F.foldLeftM[Either[Int, *], Int, Int](ns, 0) { (sum, n) =>
Expand All @@ -65,7 +65,7 @@ trait ScalaVersionSpecificFoldableSuite { self: FoldableSuiteAdditional =>
assert(res == Left(100000))
}

test(".foldLeftM short-circuiting optimality") {
test("Foldable[LazyList].foldLeftM short-circuiting optimality") {
implicit val F = foldableLazyListWithDefaultImpl

// test that no more elements are evaluated than absolutely necessary
Expand All @@ -80,13 +80,13 @@ trait ScalaVersionSpecificFoldableSuite { self: FoldableSuiteAdditional =>
assert(concatUntil("Zero" #:: "One" #:: "STOP" #:: boomLazyList[String], "STOP") == Left("ZeroOne"))
}

test(".existsM/.forallM short-circuiting") {
test("Foldable[LazyList].existsM/.forallM short-circuiting") {
implicit val F = foldableLazyListWithDefaultImpl
assert(F.existsM[Id, Boolean](true #:: boomLazyList[Boolean])(identity) == true)
assert(F.forallM[Id, Boolean](false #:: boomLazyList[Boolean])(identity) == false)
}

test(".findM/.collectFirstSomeM short-circuiting") {
test("Foldable[LazyList].findM/.collectFirstSomeM short-circuiting") {
implicit val F = foldableLazyListWithDefaultImpl
assert((1 #:: boomLazyList[Int]).findM[Id](_ > 0) == Some(1))
assert((1 #:: boomLazyList[Int]).collectFirstSomeM[Id, Int](Option.apply) == Some(1))
Expand Down

0 comments on commit 67dc634

Please sign in to comment.