From a27927d22b8d8916715d31835e3a096c79a00b32 Mon Sep 17 00:00:00 2001 From: Stephen Lazaro Date: Mon, 27 Nov 2017 13:31:28 -0800 Subject: [PATCH] Increase WriterT coverage, tut:reset --- docs/src/main/tut/typeclasses/contravariantmonoidal.md | 2 +- tests/src/test/scala/cats/tests/WriterTSuite.scala | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/src/main/tut/typeclasses/contravariantmonoidal.md b/docs/src/main/tut/typeclasses/contravariantmonoidal.md index df07465894..06d0e575fc 100644 --- a/docs/src/main/tut/typeclasses/contravariantmonoidal.md +++ b/docs/src/main/tut/typeclasses/contravariantmonoidal.md @@ -10,7 +10,7 @@ scaladoc: "#cats.ContravariantMonoidal" The `ContravariantMonoidal` type class is for [`Contravariant`](contravariant.html) functors that can define a `product` function and a `unit` function. -```scala +```tut:reset import cats.Contravariant trait ContravariantMonoidal[F[_]] extends Contravariant[F] { diff --git a/tests/src/test/scala/cats/tests/WriterTSuite.scala b/tests/src/test/scala/cats/tests/WriterTSuite.scala index 687c0d9e86..f1e0329da2 100644 --- a/tests/src/test/scala/cats/tests/WriterTSuite.scala +++ b/tests/src/test/scala/cats/tests/WriterTSuite.scala @@ -363,8 +363,11 @@ class WriterTSuite extends CatsSuite { } { - // F has a ContravariantMonoidal + // F has a ContravariantMonoidal ContravariantMonoidal[WriterT[Const[String, ?], Int, ?]] + + checkAll("WriterT[Const[String, ?], Int, ?]", ContravariantMonoidalTests[WriterT[Const[String, ?], Int, ?]].contravariantMonoidal[Int, Int, Int]) + checkAll("ContravariantMonoidal[WriterT[Const[String, ?], Int, ?]]", SerializableTests.serializable(ContravariantMonoidal[WriterT[Const[String, ?], Int, ?]])) } checkAll("WriterT[Option, Int, ?]", CommutativeMonadTests[WriterT[Option, Int, ?]].commutativeMonad[Int, Int, Int])