Skip to content

Commit

Permalink
Adding implicit resolution tests for piecemeal imports for hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
yilinwei committed May 26, 2017
1 parent 4775bd8 commit 4acff56
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/src/test/scala/cats/tests/EqTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cats
package tests

import org.scalatest._

import cats.functor._

class EqTests extends FunSuite {
{
import cats.implicits._
implicitly[Invariant[Eq]]
implicitly[Contravariant[Eq]]
implicitly[Cartesian[Eq]]
implicitly[ContravariantCartesian[Eq]]
}

{
import cats.instances.eq._
implicitly[Invariant[Eq]]
implicitly[Contravariant[Eq]]
implicitly[Cartesian[Eq]]
implicitly[ContravariantCartesian[Eq]]
}
}
22 changes: 22 additions & 0 deletions tests/src/test/scala/cats/tests/MonoidTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cats
package tests

import org.scalatest._

import cats.functor._

class MonoidTests extends FunSuite {
{
import cats.implicits._
implicitly[Invariant[Monoid]]
implicitly[Cartesian[Monoid]]
implicitly[InvariantMonoidal[Monoid]]
}

{
import cats.instances.monoid._
implicitly[Invariant[Monoid]]
implicitly[Cartesian[Monoid]]
implicitly[InvariantMonoidal[Monoid]]
}
}
20 changes: 20 additions & 0 deletions tests/src/test/scala/cats/tests/OrderTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package cats
package tests

import cats.functor._

import org.scalatest._

class OrderTests extends FunSuite {
{
import cats.implicits._
implicitly[Invariant[Order]]
implicitly[Contravariant[Order]]
}

{
import cats.instances.order._
implicitly[Invariant[Order]]
implicitly[Contravariant[Order]]
}
}
20 changes: 20 additions & 0 deletions tests/src/test/scala/cats/tests/PartialOrderTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package cats
package tests

import org.scalatest._

import cats.functor._

class PartialOrderTests extends FunSuite {
{
import cats.implicits._
implicitly[Invariant[PartialOrder]]
implicitly[Contravariant[PartialOrder]]
}

{
import cats.instances.partialOrder._
implicitly[Invariant[PartialOrder]]
implicitly[Contravariant[PartialOrder]]
}
}
22 changes: 22 additions & 0 deletions tests/src/test/scala/cats/tests/SemigroupTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cats
package tests

import org.scalatest._

import cats.functor._

class SemigroupTests extends FunSuite {
{
import cats.implicits._
implicitly[Invariant[Semigroup]]
implicitly[Cartesian[Semigroup]]
implicitly[InvariantMonoidal[Semigroup]]
}

{
import cats.instances.semigroup._
implicitly[Invariant[Semigroup]]
implicitly[Cartesian[Semigroup]]
implicitly[InvariantMonoidal[Semigroup]]
}
}

0 comments on commit 4acff56

Please sign in to comment.