From a4e15ffc9c91768e989c7fdb0caf16af8517409c Mon Sep 17 00:00:00 2001 From: Cody Allen Date: Sun, 25 Mar 2018 12:44:11 -0700 Subject: [PATCH] Check MonadTests for Vector and List This is surprising to me, so I may be missing something, but as far as I can tell, we weren't running the MonadTests for Vector and List. --- tests/src/test/scala/cats/tests/ListSuite.scala | 5 ++++- tests/src/test/scala/cats/tests/VectorSuite.scala | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/src/test/scala/cats/tests/ListSuite.scala b/tests/src/test/scala/cats/tests/ListSuite.scala index 595b9f006f..805f9b8b45 100644 --- a/tests/src/test/scala/cats/tests/ListSuite.scala +++ b/tests/src/test/scala/cats/tests/ListSuite.scala @@ -2,7 +2,7 @@ package cats package tests import cats.data.{NonEmptyList, ZipList} -import cats.laws.discipline.{CommutativeApplyTests, TraverseTests, CoflatMapTests, AlternativeTests, SerializableTests, SemigroupalTests} +import cats.laws.discipline.{CommutativeApplyTests, TraverseTests, CoflatMapTests, AlternativeTests, MonadTests, SerializableTests, SemigroupalTests} import cats.laws.discipline.arbitrary._ class ListSuite extends CatsSuite { @@ -19,6 +19,9 @@ class ListSuite extends CatsSuite { checkAll("List[Int] with Option", TraverseTests[List].traverse[Int, Int, Int, Set[Int], Option, Option]) checkAll("Traverse[List]", SerializableTests.serializable(Traverse[List])) + checkAll("List[Int]", MonadTests[List].monad[Int, Int, Int]) + checkAll("Monad[List]", SerializableTests.serializable(Monad[List])) + checkAll("ZipList[Int]", CommutativeApplyTests[ZipList].commutativeApply[Int, Int, Int]) test("nel => list => nel returns original nel")( diff --git a/tests/src/test/scala/cats/tests/VectorSuite.scala b/tests/src/test/scala/cats/tests/VectorSuite.scala index 0ff1b03562..2ae3ce5f6a 100644 --- a/tests/src/test/scala/cats/tests/VectorSuite.scala +++ b/tests/src/test/scala/cats/tests/VectorSuite.scala @@ -2,7 +2,7 @@ package cats package tests import cats.data.{NonEmptyVector, ZipVector} -import cats.laws.discipline.{CommutativeApplyTests, AlternativeTests, CoflatMapTests, SerializableTests, TraverseTests, SemigroupalTests} +import cats.laws.discipline.{CommutativeApplyTests, AlternativeTests, CoflatMapTests, MonadTests, SerializableTests, TraverseTests, SemigroupalTests} import cats.laws.discipline.arbitrary._ class VectorSuite extends CatsSuite { @@ -18,6 +18,9 @@ class VectorSuite extends CatsSuite { checkAll("Vector[Int] with Option", TraverseTests[Vector].traverse[Int, Int, Int, Set[Int], Option, Option]) checkAll("Traverse[Vector]", SerializableTests.serializable(Traverse[Vector])) + checkAll("Vector[Int]", MonadTests[Vector].monad[Int, Int, Int]) + checkAll("Monad[Vector]", SerializableTests.serializable(Monad[Vector])) + checkAll("ZipVector[Int]", CommutativeApplyTests[ZipVector].commutativeApply[Int, Int, Int]) test("show") {