From 1a3b46517bc19b50c5d84d9c2b18340222d2e236 Mon Sep 17 00:00:00 2001 From: Cody Allen Date: Tue, 15 Dec 2015 07:56:15 -0500 Subject: [PATCH] Check that Cokleisli contramapValue and lmap methods are consistent --- tests/src/test/scala/cats/tests/CokleisliTests.scala | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/src/test/scala/cats/tests/CokleisliTests.scala b/tests/src/test/scala/cats/tests/CokleisliTests.scala index bdab63439c..a635e9b13e 100644 --- a/tests/src/test/scala/cats/tests/CokleisliTests.scala +++ b/tests/src/test/scala/cats/tests/CokleisliTests.scala @@ -70,4 +70,9 @@ class CokleisliTests extends SlowCatsSuite { } + test("contramapValue with Id consistent with lmap"){ + forAll { (c: Cokleisli[Id, Int, Long], f: Char => Int) => + c.contramapValue[Char](f) should === (c.lmap(f)) + } + } }