Skip to content

Commit

Permalink
Add Bifunctor compose test
Browse files Browse the repository at this point in the history
  • Loading branch information
adelbertc committed Mar 19, 2016
1 parent a2ea8cc commit ac34ba0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/src/test/scala/cats/tests/BifunctorTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package cats
package tests

import cats.functor.Bifunctor
import cats.laws.discipline.{SerializableTests, BifunctorTests => BifunctorChecks}
import cats.laws.discipline.eq.tuple2Eq

class BifunctorTests extends CatsSuite {
type Tuple2Either[A, B] = (Either[A, B], Either[A, B])
val tuple2ComposeEither: Bifunctor[Tuple2Either] =
Bifunctor[Tuple2].compose[Either]

checkAll("Tuple2 compose Either", BifunctorChecks(tuple2ComposeEither).bifunctor[Int, Int, Int, String, String, String])
checkAll("Bifunctor[Tuple2 compose Either]", SerializableTests.serializable(tuple2ComposeEither))
}

0 comments on commit ac34ba0

Please sign in to comment.