diff --git a/tests/src/test/scala/cats/tests/MonadCombineSuite.scala b/tests/src/test/scala/cats/tests/AlternativeSuite.scala similarity index 54% rename from tests/src/test/scala/cats/tests/MonadCombineSuite.scala rename to tests/src/test/scala/cats/tests/AlternativeSuite.scala index 2176a2e3613..dac858a9b77 100644 --- a/tests/src/test/scala/cats/tests/MonadCombineSuite.scala +++ b/tests/src/test/scala/cats/tests/AlternativeSuite.scala @@ -2,6 +2,14 @@ package cats package tests class MonadCombineSuite extends CatsSuite { + test("unite") { + forAll { (list: List[Option[String]]) => + val expected = list.collect { case Some(s) => s } + + Alternative[List].unite(list) should === (expected) + } + } + test("separate") { forAll { (list: List[Either[Int, String]]) => val ints = list.collect { case Left(i) => i } @@ -11,4 +19,10 @@ class MonadCombineSuite extends CatsSuite { Alternative[List].separate(list) should === (expected) } } + + test("guard") { + forAll { (b: Boolean) => + Alternative[Option].guard(b).isDefined should === (b) + } + } }