Skip to content

Commit

Permalink
updated test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gagandeepkalra committed Jun 25, 2020
1 parent 24e82ea commit 6316011
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/test/scala/cats/tests/VarianceSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ class VarianceSuite extends CatsSuite {
def inferred[F[_, _]: Profunctor](fi: F[Int, Int]): F[Either[Foo, Foo], Either[Foo, Foo]] = shouldInfer[F](fi)
}

test("Auto-variance should left narrow a profunctor automatically") {
test("Auto-variance should widen the second type parameter of a profunctor automatically") {
def shouldInfer[F[_, _]: Profunctor](fi: F[Int, Int]): F[Int, Either[Bar, Baz.type]] =
fi.dimap(identity[Int])(i => if (true) Left(Bar(i)) else Right(Baz))

def inferred[F[_, _]: Profunctor](fi: F[Int, Int]): F[Int, Either[Foo, Foo]] = shouldInfer[F](fi)
}

test("Auto-variance should right widen a profunctor automatically") {
test("Auto-variance should narrow the first type parameter of a profunctor automatically") {
def shouldInfer[F[_, _]: Profunctor](fi: F[Int, Int]): F[Either[FooBar, FooBar], Int] =
fi.dimap((_: Either[FooBar, FooBar]) => 1)(identity[Int])

Expand Down

0 comments on commit 6316011

Please sign in to comment.