diff --git a/tests/src/test/scala/cats/tests/AlternativeSuite.scala b/tests/src/test/scala/cats/tests/AlternativeSuite.scala new file mode 100644 index 0000000000..7298600a36 --- /dev/null +++ b/tests/src/test/scala/cats/tests/AlternativeSuite.scala @@ -0,0 +1,27 @@ +package cats +package tests + +class AlternativeSuite 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 } + val strings = list.collect { case Right(s) => s } + val expected = (ints, strings) + + Alternative[List].separate(list) should === (expected) + } + } + + test("guard") { + assert(Alternative[Option].guard(true).isDefined) + assert(Alternative[Option].guard(false).isEmpty) + } +} diff --git a/tests/src/test/scala/cats/tests/MonadCombineSuite.scala b/tests/src/test/scala/cats/tests/MonadCombineSuite.scala deleted file mode 100644 index 2176a2e361..0000000000 --- a/tests/src/test/scala/cats/tests/MonadCombineSuite.scala +++ /dev/null @@ -1,14 +0,0 @@ -package cats -package tests - -class MonadCombineSuite extends CatsSuite { - test("separate") { - forAll { (list: List[Either[Int, String]]) => - val ints = list.collect { case Left(i) => i } - val strings = list.collect { case Right(s) => s } - val expected = (ints, strings) - - Alternative[List].separate(list) should === (expected) - } - } -}