Package

cats

tests

Permalink

package tests

Visibility
  1. Public
  2. All

Type Members

  1. final class CatsEquivalence[T] extends Equivalence[T]

    Permalink
  2. trait CatsSuite extends AnyFunSuiteLike with Matchers with ScalaCheckDrivenPropertyChecks with Discipline with TestSettings with AllInstances with AllInstancesBinCompat0 with AllInstancesBinCompat1 with AllInstancesBinCompat2 with AllInstancesBinCompat3 with AllInstancesBinCompat4 with AllInstancesBinCompat5 with AllSyntax with AllSyntaxBinCompat0 with AllSyntaxBinCompat1 with AllSyntaxBinCompat2 with AllSyntaxBinCompat3 with AllSyntaxBinCompat4 with AllSyntaxBinCompat5 with StrictCatsEquality

    Permalink

    An opinionated stack of traits to improve consistency and reduce boilerplate in Cats tests.

  3. final case class ListWrapper[A](list: List[A]) extends AnyVal with Product with Serializable

    Permalink

    This data type exists purely for testing.

    This data type exists purely for testing.

    The problem this type solves is to assist in picking up type class instances that have more general constraints.

    For instance, OneAnd[?, F[_]] has a Monad instance if F[_] does too. By extension, it has an Applicative instance, since Applicative is a superclass of Monad.

    However, if F[_] doesn't have a Monad instance but does have an Applicative instance (e.g. Validated), you can still get an Applicative instance for OneAnd[?, F[_]]. These two instances are different however, and it is a good idea to test to make sure all "variants" of the instances are lawful.

    By providing this data type, we can have implicit search pick up a specific type class instance by asking for it explicitly in a block. Note that ListWrapper has no type class instances in implicit scope, save for ones related to testing (e.g. Eq, Arbitrary, Cogen).

    {
      implicit val functor = ListWrapper.functor
      checkAll(..., ...)
    }
  4. trait LowPriorityStrictCatsConstraints extends TripleEquals

    Permalink
  5. trait SlowCatsSuite extends CatsSuite

    Permalink
  6. trait StrictCatsEquality extends LowPriorityStrictCatsConstraints

    Permalink
  7. trait TestSettings extends Configuration with Matchers

    Permalink

Value Members

  1. object BuildInfo extends Product with Serializable

    Permalink

    This object was generated by sbt-buildinfo.

  2. object Helpers

    Permalink

    Helpers provides new concrete types where we control exactly which type class instances are available.

    Helpers provides new concrete types where we control exactly which type class instances are available. For example, the SL type has:

    • Semilattice[SL]
    • Arbitrary[SL]
    • Eq[SL]

    (All types in Helpers have Arbitrary and Eq instances.)

    These are useful when a type constructor (e.g. Function0) can produce many different instances depending on which instances are available for its type parameter.

  3. object ListWrapper extends Serializable

    Permalink
  4. object StrictCatsEquality extends StrictCatsEquality

    Permalink

Ungrouped