diff --git a/free/src/test/scala/cats/free/CofreeTests.scala b/free/src/test/scala/cats/free/CofreeSuite.scala similarity index 97% rename from free/src/test/scala/cats/free/CofreeTests.scala rename to free/src/test/scala/cats/free/CofreeSuite.scala index 3126771554..146e7cc401 100644 --- a/free/src/test/scala/cats/free/CofreeTests.scala +++ b/free/src/test/scala/cats/free/CofreeSuite.scala @@ -7,9 +7,9 @@ import cats.syntax.list._ import cats.tests.{CatsSuite, Spooky} import org.scalacheck.{Arbitrary, Cogen, Gen} -class CofreeTests extends CatsSuite { +class CofreeSuite extends CatsSuite { - import CofreeTests._ + import CofreeSuite._ implicit val iso = SemigroupalTests.Isomorphisms.invariant[Cofree[Option, ?]] @@ -116,9 +116,9 @@ class CofreeTests extends CatsSuite { } -object CofreeTests extends CofreeTestsInstances +object CofreeSuite extends CofreeSuiteInstances -sealed trait CofreeTestsInstances { +sealed trait CofreeSuiteInstances { type CofreeNel[A] = Cofree[Option, A] type CofreeRoseTree[A] = Cofree[List, A] diff --git a/free/src/test/scala/cats/free/CoyonedaTests.scala b/free/src/test/scala/cats/free/CoyonedaSuite.scala similarity index 97% rename from free/src/test/scala/cats/free/CoyonedaTests.scala rename to free/src/test/scala/cats/free/CoyonedaSuite.scala index 379c3580bb..17e61ea4ce 100644 --- a/free/src/test/scala/cats/free/CoyonedaTests.scala +++ b/free/src/test/scala/cats/free/CoyonedaSuite.scala @@ -7,7 +7,7 @@ import cats.laws.discipline.{FunctorTests, SerializableTests} import org.scalacheck.Arbitrary -class CoyonedaTests extends CatsSuite { +class CoyonedaSuite extends CatsSuite { implicit def coyonedaArbitrary[F[_] : Functor, A : Arbitrary](implicit F: Arbitrary[F[A]]): Arbitrary[Coyoneda[F, A]] = Arbitrary(F.arbitrary.map(Coyoneda.lift)) diff --git a/free/src/test/scala/cats/free/FreeApplicativeTests.scala b/free/src/test/scala/cats/free/FreeApplicativeSuite.scala similarity index 98% rename from free/src/test/scala/cats/free/FreeApplicativeTests.scala rename to free/src/test/scala/cats/free/FreeApplicativeSuite.scala index 05abf3ad5b..7f85edb7b9 100644 --- a/free/src/test/scala/cats/free/FreeApplicativeTests.scala +++ b/free/src/test/scala/cats/free/FreeApplicativeSuite.scala @@ -8,8 +8,8 @@ import cats.data.State import org.scalacheck.{Arbitrary, Gen} -class FreeApplicativeTests extends CatsSuite { - import FreeApplicativeTests._ +class FreeApplicativeSuite extends CatsSuite { + import FreeApplicativeSuite._ implicit val iso = SemigroupalTests.Isomorphisms.invariant[FreeApplicative[Option, ?]] @@ -130,7 +130,7 @@ class FreeApplicativeTests extends CatsSuite { } } -object FreeApplicativeTests { +object FreeApplicativeSuite { private def freeGen[F[_], A](maxDepth: Int)(implicit F: Arbitrary[F[A]], FF: Arbitrary[(A, A) => A], A: Arbitrary[A]): Gen[FreeApplicative[F, A]] = { val noFlatMapped = Gen.oneOf( A.arbitrary.map(FreeApplicative.pure[F, A]), diff --git a/free/src/test/scala/cats/free/FreeInvariantMonoidalTests.scala b/free/src/test/scala/cats/free/FreeInvariantMonoidalSuite.scala similarity index 96% rename from free/src/test/scala/cats/free/FreeInvariantMonoidalTests.scala rename to free/src/test/scala/cats/free/FreeInvariantMonoidalSuite.scala index e4a3fe3283..86894e8d30 100644 --- a/free/src/test/scala/cats/free/FreeInvariantMonoidalTests.scala +++ b/free/src/test/scala/cats/free/FreeInvariantMonoidalSuite.scala @@ -6,9 +6,9 @@ import cats.free.FreeInvariantMonoidal import cats.laws.discipline.{InvariantMonoidalTests, SerializableTests} import cats.laws.discipline.SemigroupalTests.Isomorphisms import org.scalacheck.{Arbitrary, Gen} -import cats.tests.CsvCodecInvariantMonoidalTests._ +import cats.tests.CsvCodecInvariantMonoidalSuite._ -class FreeInvariantMonoidalTests extends CatsSuite { +class FreeInvariantMonoidalSuite extends CatsSuite { implicit def freeInvariantMonoidalArbitrary[F[_], A](implicit F: Arbitrary[F[A]], A: Arbitrary[A]): Arbitrary[FreeInvariantMonoidal[F, A]] = Arbitrary( Gen.oneOf( diff --git a/free/src/test/scala/cats/free/FreeTests.scala b/free/src/test/scala/cats/free/FreeSuite.scala similarity index 98% rename from free/src/test/scala/cats/free/FreeTests.scala rename to free/src/test/scala/cats/free/FreeSuite.scala index 7727437eea..573df80fc9 100644 --- a/free/src/test/scala/cats/free/FreeTests.scala +++ b/free/src/test/scala/cats/free/FreeSuite.scala @@ -10,8 +10,8 @@ import cats.tests.CatsSuite import org.scalacheck.{Arbitrary, Gen, Cogen} import Arbitrary.arbFunction1 -class FreeTests extends CatsSuite { - import FreeTests._ +class FreeSuite extends CatsSuite { + import FreeSuite._ implicit val iso = SemigroupalTests.Isomorphisms.invariant[Free[Option, ?]] @@ -195,7 +195,7 @@ class FreeTests extends CatsSuite { } } -object FreeTests extends FreeTestsInstances { +object FreeSuite extends FreeSuiteInstances { import cats.instances.function._ implicit def trampolineArbitrary[A:Arbitrary]: Arbitrary[Trampoline[A]] = @@ -205,7 +205,7 @@ object FreeTests extends FreeTestsInstances { freeEq[Function0, A] } -sealed trait FreeTestsInstances { +sealed trait FreeSuiteInstances { val headOptionU = λ[FunctionK[List,Option]](_.headOption) private def freeGen[F[_], A](maxDepth: Int)(implicit F: Arbitrary[F[A]], A: Arbitrary[A]): Gen[Free[F, A]] = { diff --git a/free/src/test/scala/cats/free/FreeTTests.scala b/free/src/test/scala/cats/free/FreeTSuite.scala similarity index 97% rename from free/src/test/scala/cats/free/FreeTTests.scala rename to free/src/test/scala/cats/free/FreeTSuite.scala index d61b4eb782..d604021fe8 100644 --- a/free/src/test/scala/cats/free/FreeTTests.scala +++ b/free/src/test/scala/cats/free/FreeTSuite.scala @@ -10,9 +10,9 @@ import cats.tests.CatsSuite import cats.instances.option._ import org.scalacheck.{Arbitrary, Gen, Cogen} -class FreeTTests extends CatsSuite { +class FreeTSuite extends CatsSuite { - import FreeTTests._ + import FreeTSuite._ { implicit val freeTFlatMap: FlatMap[FreeTOption] = FreeT.catsFreeFlatMapForFreeT[Option, Option] @@ -137,7 +137,7 @@ class FreeTTests extends CatsSuite { } -object FreeTTests extends FreeTTestsInstances { +object FreeTSuite extends FreeTSuiteInstances { import Arbitrary._ import org.scalacheck.Arbitrary @@ -167,12 +167,12 @@ object FreeTTests extends FreeTTestsInstances { } -trait FreeTTestsInstances { +trait FreeTSuiteInstances { import FreeT._ import IndexedStateT._ import cats.kernel.instances.option._ - import cats.tests.IndexedStateTTests._ + import cats.tests.IndexedStateTSuite._ import SemigroupalTests._ type IntState[A] = State[Int, A] diff --git a/free/src/test/scala/cats/free/YonedaTests.scala b/free/src/test/scala/cats/free/YonedaSuite.scala similarity index 95% rename from free/src/test/scala/cats/free/YonedaTests.scala rename to free/src/test/scala/cats/free/YonedaSuite.scala index 25886e2032..3a236a449e 100644 --- a/free/src/test/scala/cats/free/YonedaTests.scala +++ b/free/src/test/scala/cats/free/YonedaSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.{FunctorTests, SerializableTests} import org.scalacheck.Arbitrary -class YonedaTests extends CatsSuite { +class YonedaSuite extends CatsSuite { implicit def yonedaArbitrary[F[_] : Functor, A](implicit F: Arbitrary[F[A]]): Arbitrary[Yoneda[F, A]] = Arbitrary(F.arbitrary.map(Yoneda(_))) diff --git a/jvm/src/test/scala/cats/tests/FutureTests.scala b/jvm/src/test/scala/cats/tests/FutureSuite.scala similarity index 97% rename from jvm/src/test/scala/cats/tests/FutureTests.scala rename to jvm/src/test/scala/cats/tests/FutureSuite.scala index 795b69c196..24af2df9d4 100644 --- a/jvm/src/test/scala/cats/tests/FutureTests.scala +++ b/jvm/src/test/scala/cats/tests/FutureSuite.scala @@ -14,7 +14,7 @@ import org.scalacheck.{Arbitrary, Cogen} import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.rng.Seed -class FutureTests extends CatsSuite { +class FutureSuite extends CatsSuite { val timeout = 3.seconds def futureEither[A](f: Future[A]): Future[Either[Throwable, A]] = diff --git a/tests/src/test/scala-2.11+/cats/tests/RegressionTests.scala b/tests/src/test/scala-2.11+/cats/tests/RegressionTests.scala index 86e06bee16..5de9ca8762 100644 --- a/tests/src/test/scala-2.11+/cats/tests/RegressionTests.scala +++ b/tests/src/test/scala-2.11+/cats/tests/RegressionTests.scala @@ -2,9 +2,9 @@ package cats package tests -import ExtraRegressionTests._ +import ExtraRegressionSuite._ -class ExtraRegressionTests extends CatsSuite { +class ExtraRegressionSuite extends CatsSuite { /** * Placed here to work around scala/bug#6260 on scala 2.10 */ @@ -14,7 +14,7 @@ class ExtraRegressionTests extends CatsSuite { } -object ExtraRegressionTests { +object ExtraRegressionSuite { final case class First[A](getFirst: A) extends AnyVal object First { implicit def showInstance[A](implicit ev: Show[A]): Show[First[A]] = new Show[First[A]] { diff --git a/tests/src/test/scala/cats/tests/AlgebraInvariantTests.scala b/tests/src/test/scala/cats/tests/AlgebraInvariantSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/AlgebraInvariantTests.scala rename to tests/src/test/scala/cats/tests/AlgebraInvariantSuite.scala index 427208741d..f9305c294d 100644 --- a/tests/src/test/scala/cats/tests/AlgebraInvariantTests.scala +++ b/tests/src/test/scala/cats/tests/AlgebraInvariantSuite.scala @@ -3,12 +3,12 @@ package tests import cats.Invariant import cats.kernel._ -import cats.kernel.laws.discipline.{SemigroupTests => SemigroupLawTests, MonoidTests => MonoidLawTests, GroupTests => GroupLawTests, _} +import cats.kernel.laws.discipline.{SemigroupTests, MonoidTests, GroupTests, _} import cats.laws.discipline.{InvariantMonoidalTests, InvariantTests, SerializableTests, SemigroupalTests} import cats.laws.discipline.eq._ import org.scalacheck.{Arbitrary, Gen} -class AlgebraInvariantTests extends CatsSuite { +class AlgebraInvariantSuite extends CatsSuite { val intMultiplication: CommutativeMonoid[Int] = new CommutativeMonoid[Int] { val empty = 1 @@ -61,7 +61,7 @@ class AlgebraInvariantTests extends CatsSuite { - checkAll("InvariantMonoidal[Semigroup]", SemigroupLawTests[Int](InvariantMonoidal[Semigroup].pure(0)).semigroup) + checkAll("InvariantMonoidal[Semigroup]", SemigroupTests[Int](InvariantMonoidal[Semigroup].pure(0)).semigroup) checkAll("InvariantMonoidal[CommutativeSemigroup]", CommutativeSemigroupTests[Int](InvariantMonoidal[CommutativeSemigroup].pure(0)).commutativeSemigroup) checkAll("Semigroupal[Monoid]", SemigroupalTests[Monoid].semigroupal[Int, Int, Int]) @@ -69,17 +69,17 @@ class AlgebraInvariantTests extends CatsSuite { { val S: Semigroup[Int] = Semigroup[Int].imap(identity)(identity) - checkAll("Semigroup[Int]", SemigroupLawTests[Int](S).semigroup) + checkAll("Semigroup[Int]", SemigroupTests[Int](S).semigroup) } { val S: Monoid[Int] = Monoid[Int].imap(identity)(identity) - checkAll("Monoid[Int]", MonoidLawTests[Int](S).monoid) + checkAll("Monoid[Int]", MonoidTests[Int](S).monoid) } { val S: Group[Int] = Group[Int].imap(identity)(identity) - checkAll("Group[Int]", GroupLawTests[Int](S).group) + checkAll("Group[Int]", GroupTests[Int](S).group) } { diff --git a/tests/src/test/scala/cats/tests/ApplicativeErrorCheck.scala b/tests/src/test/scala/cats/tests/ApplicativeErrorSuite.scala similarity index 95% rename from tests/src/test/scala/cats/tests/ApplicativeErrorCheck.scala rename to tests/src/test/scala/cats/tests/ApplicativeErrorSuite.scala index 7b8d8ab006..fc47ff8f1d 100644 --- a/tests/src/test/scala/cats/tests/ApplicativeErrorCheck.scala +++ b/tests/src/test/scala/cats/tests/ApplicativeErrorSuite.scala @@ -3,7 +3,7 @@ package tests import cats.data.EitherT -class ApplicativeErrorCheck extends CatsSuite { +class ApplicativeErrorSuite extends CatsSuite { val failed: Option[Int] = (()).raiseError[Option, Int] diff --git a/tests/src/test/scala/cats/tests/ApplicativeTests.scala b/tests/src/test/scala/cats/tests/ApplicativeSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/ApplicativeTests.scala rename to tests/src/test/scala/cats/tests/ApplicativeSuite.scala index c5c11c2e7c..81f36f13be 100644 --- a/tests/src/test/scala/cats/tests/ApplicativeTests.scala +++ b/tests/src/test/scala/cats/tests/ApplicativeSuite.scala @@ -4,7 +4,7 @@ package tests import cats.Applicative -class ApplicativeCheck extends CatsSuite { +class ApplicativeSuite extends CatsSuite { test("Applicative#traverse is equivalent to Traverse#traverse") { val f: (Int) => Option[Int] = x => Some(x + 1) diff --git a/tests/src/test/scala/cats/tests/AsTests.scala b/tests/src/test/scala/cats/tests/AsSuite.scala similarity index 99% rename from tests/src/test/scala/cats/tests/AsTests.scala rename to tests/src/test/scala/cats/tests/AsSuite.scala index acb24d2acf..33a9742a96 100644 --- a/tests/src/test/scala/cats/tests/AsTests.scala +++ b/tests/src/test/scala/cats/tests/AsSuite.scala @@ -4,7 +4,7 @@ package tests import cats.laws.discipline.{CategoryTests, SerializableTests} import org.scalacheck.{Arbitrary, Gen} import cats.arrow.Category -class AsTests extends CatsSuite { +class AsSuite extends CatsSuite { import evidence._ def toMap[A, B, X](fa: List[X])(implicit ev: X <~< (A,B)): Map[A,B] = { diff --git a/tests/src/test/scala/cats/tests/BifoldableTests.scala b/tests/src/test/scala/cats/tests/BifoldableSuite.scala similarity index 91% rename from tests/src/test/scala/cats/tests/BifoldableTests.scala rename to tests/src/test/scala/cats/tests/BifoldableSuite.scala index 8dc75de41c..2dc2930c69 100644 --- a/tests/src/test/scala/cats/tests/BifoldableTests.scala +++ b/tests/src/test/scala/cats/tests/BifoldableSuite.scala @@ -3,7 +3,7 @@ package tests import cats.laws.discipline.{BifoldableTests, SerializableTests} -class BifoldableTest extends CatsSuite { +class BifoldableSuite extends CatsSuite { type EitherEither[A, B] = Either[Either[A, B], Either[A, B]] val eitherComposeEither: Bifoldable[EitherEither] = Bifoldable[Either].compose[Either] diff --git a/tests/src/test/scala/cats/tests/BifunctorTests.scala b/tests/src/test/scala/cats/tests/BifunctorSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/BifunctorTests.scala rename to tests/src/test/scala/cats/tests/BifunctorSuite.scala index b45c1f77cd..e30fda97b6 100644 --- a/tests/src/test/scala/cats/tests/BifunctorTests.scala +++ b/tests/src/test/scala/cats/tests/BifunctorSuite.scala @@ -4,7 +4,7 @@ package tests import cats.Bifunctor import cats.laws.discipline.{BifunctorTests, FunctorTests, SerializableTests} -class BifunctorTest extends CatsSuite { +class BifunctorSuite extends CatsSuite { type Tuple2Either[A, B] = (Either[A, B], Either[A, B]) val tuple2ComposeEither: Bifunctor[Tuple2Either] = Bifunctor[Tuple2].compose[Either] diff --git a/tests/src/test/scala/cats/tests/BitSetTests.scala b/tests/src/test/scala/cats/tests/BitSetSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/BitSetTests.scala rename to tests/src/test/scala/cats/tests/BitSetSuite.scala index ac79dc764c..de61ad9d35 100644 --- a/tests/src/test/scala/cats/tests/BitSetTests.scala +++ b/tests/src/test/scala/cats/tests/BitSetSuite.scala @@ -5,7 +5,7 @@ import org.scalacheck.Arbitrary.arbitrary import scala.collection.immutable.BitSet -class BitSetTests extends CatsSuite { +class BitSetSuite extends CatsSuite { implicit val arbitraryBitSet: Arbitrary[BitSet] = Arbitrary(arbitrary[List[Short]].map(ns => BitSet(ns.map(_ & 0xffff): _*))) diff --git a/tests/src/test/scala/cats/tests/BitraverseTests.scala b/tests/src/test/scala/cats/tests/BitraverseSuite.scala similarity index 91% rename from tests/src/test/scala/cats/tests/BitraverseTests.scala rename to tests/src/test/scala/cats/tests/BitraverseSuite.scala index f438b36b19..0664bbda0b 100644 --- a/tests/src/test/scala/cats/tests/BitraverseTests.scala +++ b/tests/src/test/scala/cats/tests/BitraverseSuite.scala @@ -3,7 +3,7 @@ package tests import cats.laws.discipline.{BitraverseTests, SerializableTests} -class BitraverseTest extends CatsSuite { +class BitraverseSuite extends CatsSuite { type EitherTuple2[A, B] = Either[(A, B), (A, B)] val eitherComposeTuple2: Bitraverse[EitherTuple2] = Bitraverse[Either].compose[Tuple2] diff --git a/tests/src/test/scala/cats/tests/CategoryTests.scala b/tests/src/test/scala/cats/tests/CategorySuite.scala similarity index 71% rename from tests/src/test/scala/cats/tests/CategoryTests.scala rename to tests/src/test/scala/cats/tests/CategorySuite.scala index 9c571600af..d4e215d997 100644 --- a/tests/src/test/scala/cats/tests/CategoryTests.scala +++ b/tests/src/test/scala/cats/tests/CategorySuite.scala @@ -1,13 +1,13 @@ package cats package tests -import cats.kernel.laws.discipline.{MonoidTests => MonoidLawTests} +import cats.kernel.laws.discipline.MonoidTests import cats.arrow.Category import cats.laws.discipline.{MonoidKTests, SerializableTests} import cats.laws.discipline.eq.catsLawsEqForFn1 -class CategoryTest extends CatsSuite { +class CategorySuite extends CatsSuite { val functionCategory = Category[Function1] type Endo[A] = Function1[A, A] @@ -15,5 +15,5 @@ class CategoryTest extends CatsSuite { checkAll("Category[Function1].algebraK", SerializableTests.serializable(functionCategory.algebraK)) val functionAlgebra = functionCategory.algebra[Int] - checkAll("Category[Function1].algebra[Int]", MonoidLawTests[Endo[Int]](functionAlgebra).monoid) + checkAll("Category[Function1].algebra[Int]", MonoidTests[Endo[Int]](functionAlgebra).monoid) } diff --git a/tests/src/test/scala/cats/tests/CokleisliTests.scala b/tests/src/test/scala/cats/tests/CokleisliSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/CokleisliTests.scala rename to tests/src/test/scala/cats/tests/CokleisliSuite.scala index 74fd48d846..7ffa5f5bad 100644 --- a/tests/src/test/scala/cats/tests/CokleisliTests.scala +++ b/tests/src/test/scala/cats/tests/CokleisliSuite.scala @@ -9,7 +9,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ import org.scalacheck.Arbitrary -class CokleisliTests extends SlowCatsSuite { +class CokleisliSuite extends SlowCatsSuite { implicit override val generatorDrivenConfig: PropertyCheckConfiguration = slowCheckConfiguration.copy( diff --git a/tests/src/test/scala/cats/tests/ComposeTest.scala b/tests/src/test/scala/cats/tests/ComposeSuite.scala similarity index 74% rename from tests/src/test/scala/cats/tests/ComposeTest.scala rename to tests/src/test/scala/cats/tests/ComposeSuite.scala index 1434642093..10f839f893 100644 --- a/tests/src/test/scala/cats/tests/ComposeTest.scala +++ b/tests/src/test/scala/cats/tests/ComposeSuite.scala @@ -1,13 +1,12 @@ package cats package tests -import cats.kernel.laws.discipline.{SemigroupTests => SemigroupLawTests} - +import cats.kernel.laws.discipline.SemigroupTests import cats.arrow.Compose import cats.laws.discipline.{SemigroupKTests, SerializableTests} import cats.laws.discipline.eq.catsLawsEqForFn1 -class ComposeTest extends CatsSuite { +class ComposeSuite extends CatsSuite { val functionCompose = Compose[Function1] type Endo[A] = Function1[A, A] @@ -15,7 +14,7 @@ class ComposeTest extends CatsSuite { checkAll("Compose[Function1].algebraK", SerializableTests.serializable(functionCompose.algebraK)) val functionAlgebra = functionCompose.algebra[Int] - checkAll("Compose[Function1].algebra[Int]", SemigroupLawTests[Endo[Int]](functionAlgebra).semigroup) + checkAll("Compose[Function1].algebra[Int]", SemigroupTests[Endo[Int]](functionAlgebra).semigroup) test("syntax") { (((_: Int) + 1) <<< ((_: Int) / 2))(2) should be(2) diff --git a/tests/src/test/scala/cats/tests/ConstTests.scala b/tests/src/test/scala/cats/tests/ConstSuite.scala similarity index 81% rename from tests/src/test/scala/cats/tests/ConstTests.scala rename to tests/src/test/scala/cats/tests/ConstSuite.scala index 52f12d65fe..6be8244d75 100644 --- a/tests/src/test/scala/cats/tests/ConstTests.scala +++ b/tests/src/test/scala/cats/tests/ConstSuite.scala @@ -2,19 +2,13 @@ package cats package tests -import cats.kernel.laws.discipline.{ - MonoidTests => MonoidLawTests, - SemigroupTests => SemigroupLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, OrderTests, PartialOrderTests, EqTests} import cats.Contravariant import cats.data.{Const, NonEmptyList} import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ -class ConstTests extends CatsSuite { +class ConstSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Const[String, ?]](Const.catsDataTraverseForConst) @@ -36,17 +30,17 @@ class ConstTests extends CatsSuite { } // Algebra checks for Serializability of instances as part of the laws - checkAll("Monoid[Const[Int, String]]", MonoidLawTests[Const[Int, String]].monoid) + checkAll("Monoid[Const[Int, String]]", MonoidTests[Const[Int, String]].monoid) - checkAll("Const[NonEmptyList[Int], String]", SemigroupLawTests[Const[NonEmptyList[Int], String]].semigroup) + checkAll("Const[NonEmptyList[Int], String]", SemigroupTests[Const[NonEmptyList[Int], String]].semigroup) // Note while Eq is a superclass of PartialOrder and PartialOrder a superclass // of Order, you can get different instances with different (more general) constraints. // For instance, you can get an Order for Const if the first type parameter has an Order, // but you can also get just an Eq for Const if the first type parameter has just an Eq - checkAll("Const[Map[Int, Int], String]", EqLawTests[Const[Map[Int, Int], String]].eqv) - checkAll("PartialOrder[Const[Set[Int], String]]", PartialOrderLawTests[Const[Set[Int], String]].partialOrder) - checkAll("Order[Const[Int, String]]", OrderLawTests[Const[Int, String]].order) + checkAll("Const[Map[Int, Int], String]", EqTests[Const[Map[Int, Int], String]].eqv) + checkAll("PartialOrder[Const[Set[Int], String]]", PartialOrderTests[Const[Set[Int], String]].partialOrder) + checkAll("Order[Const[Int, String]]", OrderTests[Const[Int, String]].order) checkAll("Const[String, Int]", ContravariantTests[Const[String, ?]].contravariant[Int, Int, Int]) checkAll("Contravariant[Const[String, ?]]", SerializableTests.serializable(Contravariant[Const[String, ?]])) diff --git a/tests/src/test/scala/cats/tests/ContravariantTests.scala b/tests/src/test/scala/cats/tests/ContravariantSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/ContravariantTests.scala rename to tests/src/test/scala/cats/tests/ContravariantSuite.scala index 6e356c1b38..c7007b0f8b 100644 --- a/tests/src/test/scala/cats/tests/ContravariantTests.scala +++ b/tests/src/test/scala/cats/tests/ContravariantSuite.scala @@ -4,7 +4,7 @@ package tests import cats.data.Const import org.scalactic.CanEqual -class ContravariantTest extends CatsSuite { +class ContravariantSuite extends CatsSuite { test("narrow equals contramap(identity)") { implicit val constInst = Const.catsDataContravariantForConst[Int] diff --git a/tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalTests.scala b/tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalSuite.scala similarity index 95% rename from tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalTests.scala rename to tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalSuite.scala index 9137f8d174..e75d0be86d 100644 --- a/tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalTests.scala +++ b/tests/src/test/scala/cats/tests/CsvCodecInvariantMonoidalSuite.scala @@ -8,7 +8,7 @@ import cats.syntax.apply._ import cats.Eq import org.scalacheck.{Arbitrary, Gen} -object CsvCodecInvariantMonoidalTests { +object CsvCodecInvariantMonoidalSuite { type CSV = List[String] /** @@ -83,9 +83,9 @@ object CsvCodecInvariantMonoidalTests { catsLawsEqForFn1[A, CSV].on[CsvCodec[A]](_.write) and catsLawsEqForFn1[CSV, (Option[A], CSV)].on[CsvCodec[A]](_.read) } -class CsvCodecInvariantMonoidalTests extends CatsSuite { +class CsvCodecInvariantMonoidalSuite extends CatsSuite { // Eveything is defined in a companion object to be serializable. - import CsvCodecInvariantMonoidalTests._ + import CsvCodecInvariantMonoidalSuite._ checkAll("InvariantMonoidal[CsvCodec]", InvariantMonoidalTests[CsvCodec].invariantMonoidal[Int, Int, Int]) checkAll("InvariantMonoidal[CsvCodec]", SerializableTests.serializable(InvariantMonoidal[CsvCodec])) diff --git a/tests/src/test/scala/cats/tests/EitherKTests.scala b/tests/src/test/scala/cats/tests/EitherKSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/EitherKTests.scala rename to tests/src/test/scala/cats/tests/EitherKSuite.scala index fc0afa918a..9871f8faf0 100644 --- a/tests/src/test/scala/cats/tests/EitherKTests.scala +++ b/tests/src/test/scala/cats/tests/EitherKSuite.scala @@ -1,13 +1,13 @@ package cats.tests import cats._ -import cats.kernel.laws.discipline.{EqTests => EqLawTests} +import cats.kernel.laws.discipline.EqTests import cats.data.EitherK import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ -class EitherKTests extends CatsSuite { +class EitherKSuite extends CatsSuite { checkAll("EitherK[Option, Option, ?]", TraverseTests[EitherK[Option, Option, ?]].traverse[Int, Int, Int, Int, Option, Option]) checkAll("Traverse[EitherK[Option, Option, ?]]", SerializableTests.serializable(Traverse[EitherK[Option, Option, ?]])) @@ -27,7 +27,7 @@ class EitherKTests extends CatsSuite { checkAll("CoflatMap[EitherK[Eval, Eval, ?]]", SerializableTests.serializable(CoflatMap[EitherK[Eval, Eval, ?]])) } - checkAll("EitherK[Option, Option, Int]", EqLawTests[EitherK[Option, Option, Int]].eqv) + checkAll("EitherK[Option, Option, Int]", EqTests[EitherK[Option, Option, Int]].eqv) checkAll("Eq[EitherK[Option, Option, Int]]", SerializableTests.serializable(Eq[EitherK[Option, Option, Int]])) checkAll("EitherK[Show, Show, ?]", ContravariantTests[EitherK[Show, Show, ?]].contravariant[Int, Int, Int]) diff --git a/tests/src/test/scala/cats/tests/EitherTests.scala b/tests/src/test/scala/cats/tests/EitherSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/EitherTests.scala rename to tests/src/test/scala/cats/tests/EitherSuite.scala index cc63bc3f1a..12f846965b 100644 --- a/tests/src/test/scala/cats/tests/EitherTests.scala +++ b/tests/src/test/scala/cats/tests/EitherSuite.scala @@ -3,19 +3,13 @@ package tests import cats.data.{ EitherT, Validated } import cats.laws.discipline._ -import cats.kernel.laws.discipline.{ - MonoidTests => MonoidLawTests, - SemigroupTests => SemigroupLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, OrderTests, PartialOrderTests, EqTests} import scala.util.Try -class EitherTests extends CatsSuite { +class EitherSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Either[Int, ?]] - checkAll("Either[String, Int]", MonoidLawTests[Either[String, Int]].monoid) + checkAll("Either[String, Int]", MonoidTests[Either[String, Int]].monoid) checkAll("Monoid[Either[String, Int]]", SerializableTests.serializable(Monoid[Either[String, Int]])) checkAll("Either[Int, Int]", SemigroupalTests[Either[Int, ?]].semigroupal[Int, Int, Int]) @@ -35,7 +29,7 @@ class EitherTests extends CatsSuite { checkAll("Either[ListWrapper[String], ?]", SemigroupKTests[Either[ListWrapper[String], ?]].semigroupK[Int]) checkAll("SemigroupK[Either[ListWrapper[String], ?]]", SerializableTests.serializable(SemigroupK[Either[ListWrapper[String], ?]])) - checkAll("Either[ListWrapper[String], Int]", SemigroupLawTests[Either[ListWrapper[String], Int]].semigroup) + checkAll("Either[ListWrapper[String], Int]", SemigroupTests[Either[ListWrapper[String], Int]].semigroup) checkAll("Semigroup[Either[ListWrapper[String], Int]]", SerializableTests.serializable(Semigroup[Either[ListWrapper[String], Int]])) val partialOrder = catsStdPartialOrderForEither[Int, String] @@ -46,12 +40,12 @@ class EitherTests extends CatsSuite { { implicit val S = ListWrapper.eqv[String] implicit val I = ListWrapper.eqv[Int] - checkAll("Either[ListWrapper[String], ListWrapper[Int]]", EqLawTests[Either[ListWrapper[String], ListWrapper[Int]]].eqv) + checkAll("Either[ListWrapper[String], ListWrapper[Int]]", EqTests[Either[ListWrapper[String], ListWrapper[Int]]].eqv) checkAll("Eq[Either[ListWrapper[String], ListWrapper[Int]]]", SerializableTests.serializable(Eq[Either[ListWrapper[String], ListWrapper[Int]]])) } - checkAll("Either[Int, String]", PartialOrderLawTests[Either[Int, String]](partialOrder).partialOrder) - checkAll("Either[Int, String]", OrderLawTests[Either[Int, String]](order).order) + checkAll("Either[Int, String]", PartialOrderTests[Either[Int, String]](partialOrder).partialOrder) + checkAll("Either[Int, String]", OrderTests[Either[Int, String]](order).order) test("Left/Right cast syntax") { forAll { (e: Either[Int, String]) => diff --git a/tests/src/test/scala/cats/tests/EitherTTests.scala b/tests/src/test/scala/cats/tests/EitherTSuite.scala similarity index 95% rename from tests/src/test/scala/cats/tests/EitherTTests.scala rename to tests/src/test/scala/cats/tests/EitherTSuite.scala index c85ff9d9b3..87cb2cc14a 100644 --- a/tests/src/test/scala/cats/tests/EitherTTests.scala +++ b/tests/src/test/scala/cats/tests/EitherTSuite.scala @@ -6,16 +6,10 @@ import cats.data.EitherT import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ -import cats.kernel.laws.discipline.{ -MonoidTests => MonoidLawTests, -SemigroupTests => SemigroupLawTests, -OrderTests => OrderLawTests, -PartialOrderTests => PartialOrderLawTests, -EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, OrderTests, PartialOrderTests, EqTests} -class EitherTTests extends CatsSuite { +class EitherTSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[EitherT[ListWrapper, String, ?]](EitherT.catsDataFunctorForEitherT(ListWrapper.functor)) { @@ -26,7 +20,7 @@ class EitherTTests extends CatsSuite { { implicit val F = ListWrapper.order[Either[String, Int]] - checkAll("EitherT[List, String, Int]", OrderLawTests[EitherT[ListWrapper, String, Int]].order) + checkAll("EitherT[List, String, Int]", OrderTests[EitherT[ListWrapper, String, Int]].order) checkAll("Order[EitherT[List, String, Int]]", SerializableTests.serializable(Order[EitherT[ListWrapper, String, Int]])) } @@ -106,14 +100,14 @@ class EitherTTests extends CatsSuite { { implicit val F = ListWrapper.partialOrder[Either[String, Int]] - checkAll("EitherT[ListWrapper, String, Int]", PartialOrderLawTests[EitherT[ListWrapper, String, Int]].partialOrder) + checkAll("EitherT[ListWrapper, String, Int]", PartialOrderTests[EitherT[ListWrapper, String, Int]].partialOrder) checkAll("PartialOrder[EitherT[ListWrapper, String, Int]]", SerializableTests.serializable(PartialOrder[EitherT[ListWrapper, String, Int]])) } { implicit val F = ListWrapper.semigroup[Either[String, Int]] - checkAll("EitherT[ListWrapper, String, Int]", SemigroupLawTests[EitherT[ListWrapper, String, Int]].semigroup) + checkAll("EitherT[ListWrapper, String, Int]", SemigroupTests[EitherT[ListWrapper, String, Int]].semigroup) checkAll("Semigroup[EitherT[ListWrapper, String, Int]]", SerializableTests.serializable(Semigroup[EitherT[ListWrapper, String, Int]])) } @@ -122,14 +116,14 @@ class EitherTTests extends CatsSuite { Semigroup[EitherT[ListWrapper, String, Int]] - checkAll("EitherT[ListWrapper, String, Int]", MonoidLawTests[EitherT[ListWrapper, String, Int]].monoid) + checkAll("EitherT[ListWrapper, String, Int]", MonoidTests[EitherT[ListWrapper, String, Int]].monoid) checkAll("Monoid[EitherT[ListWrapper, String, Int]]", SerializableTests.serializable(Monoid[EitherT[ListWrapper, String, Int]])) } { implicit val F = ListWrapper.eqv[Either[String, Int]] - checkAll("EitherT[ListWrapper, String, Int]", EqLawTests[EitherT[ListWrapper, String, Int]].eqv) + checkAll("EitherT[ListWrapper, String, Int]", EqTests[EitherT[ListWrapper, String, Int]].eqv) checkAll("Eq[EitherT[ListWrapper, String, Int]]", SerializableTests.serializable(Eq[EitherT[ListWrapper, String, Int]])) } diff --git a/tests/src/test/scala/cats/tests/EqTests.scala b/tests/src/test/scala/cats/tests/EqSuite.scala similarity index 90% rename from tests/src/test/scala/cats/tests/EqTests.scala rename to tests/src/test/scala/cats/tests/EqSuite.scala index 9790482255..4b2efeaf73 100644 --- a/tests/src/test/scala/cats/tests/EqTests.scala +++ b/tests/src/test/scala/cats/tests/EqSuite.scala @@ -5,7 +5,7 @@ import org.scalatest._ -class EqTests extends FunSuite { +class EqSuite extends FunSuite { { import cats.implicits._ Invariant[Eq] diff --git a/tests/src/test/scala/cats/tests/EquivTests.scala b/tests/src/test/scala/cats/tests/EquivSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/EquivTests.scala rename to tests/src/test/scala/cats/tests/EquivSuite.scala index d1cedee4aa..26fb8271a6 100644 --- a/tests/src/test/scala/cats/tests/EquivTests.scala +++ b/tests/src/test/scala/cats/tests/EquivSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline._ import cats.laws.discipline.eq._ -class EquivTests extends CatsSuite { +class EquivSuite extends CatsSuite { Invariant[Equiv] Contravariant[Equiv] diff --git a/tests/src/test/scala/cats/tests/EvalTests.scala b/tests/src/test/scala/cats/tests/EvalSuite.scala similarity index 90% rename from tests/src/test/scala/cats/tests/EvalTests.scala rename to tests/src/test/scala/cats/tests/EvalSuite.scala index 9bed1f045c..47a1d7d6a2 100644 --- a/tests/src/test/scala/cats/tests/EvalTests.scala +++ b/tests/src/test/scala/cats/tests/EvalSuite.scala @@ -4,20 +4,13 @@ package tests import cats.laws.ComonadLaws import cats.laws.discipline.{BimonadTests, SemigroupalTests, ReducibleTests, SerializableTests} import cats.laws.discipline.arbitrary._ -import cats.kernel.laws.discipline.{ - EqTests => EqLawTests, - GroupTests => GroupLawTests, - MonoidTests => MonoidLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - SemigroupTests => SemigroupLawTests -} +import cats.kernel.laws.discipline.{EqTests, GroupTests, MonoidTests, OrderTests, PartialOrderTests, SemigroupTests} import org.scalacheck.{Arbitrary, Cogen, Gen} import org.scalacheck.Arbitrary.arbitrary import scala.annotation.tailrec import scala.math.min -class EvalTests extends CatsSuite { +class EvalSuite extends CatsSuite { implicit val eqThrow: Eq[Throwable] = Eq.allEqual /** @@ -105,31 +98,31 @@ class EvalTests extends CatsSuite { checkAll("Eval[Int]", ReducibleTests[Eval].reducible[Option, Int, Int]) checkAll("Reducible[Eval]", SerializableTests.serializable(Reducible[Eval])) - checkAll("Eval[Int]", GroupLawTests[Eval[Int]].group) + checkAll("Eval[Int]", GroupTests[Eval[Int]].group) { implicit val A = ListWrapper.monoid[Int] - checkAll("Eval[ListWrapper[Int]]", MonoidLawTests[Eval[ListWrapper[Int]]].monoid) + checkAll("Eval[ListWrapper[Int]]", MonoidTests[Eval[ListWrapper[Int]]].monoid) } { implicit val A = ListWrapper.semigroup[Int] - checkAll("Eval[ListWrapper[Int]]", SemigroupLawTests[Eval[ListWrapper[Int]]].semigroup) + checkAll("Eval[ListWrapper[Int]]", SemigroupTests[Eval[ListWrapper[Int]]].semigroup) } { implicit val A = ListWrapper.order[Int] - checkAll("Eval[ListWrapper[Int]]", OrderLawTests[Eval[ListWrapper[Int]]].order) + checkAll("Eval[ListWrapper[Int]]", OrderTests[Eval[ListWrapper[Int]]].order) } { implicit val A = ListWrapper.partialOrder[Int] - checkAll("Eval[ListWrapper[Int]]", PartialOrderLawTests[Eval[ListWrapper[Int]]].partialOrder) + checkAll("Eval[ListWrapper[Int]]", PartialOrderTests[Eval[ListWrapper[Int]]].partialOrder) } { implicit val A = ListWrapper.eqv[Int] - checkAll("Eval[ListWrapper[Int]]", EqLawTests[Eval[ListWrapper[Int]]].eqv) + checkAll("Eval[ListWrapper[Int]]", EqTests[Eval[ListWrapper[Int]]].eqv) } // The following tests check laws which are a different formulation of diff --git a/tests/src/test/scala/cats/tests/EvidenceTests.scala b/tests/src/test/scala/cats/tests/EvidenceSuite.scala similarity index 89% rename from tests/src/test/scala/cats/tests/EvidenceTests.scala rename to tests/src/test/scala/cats/tests/EvidenceSuite.scala index 2163bc8364..5cd6f7fb79 100644 --- a/tests/src/test/scala/cats/tests/EvidenceTests.scala +++ b/tests/src/test/scala/cats/tests/EvidenceSuite.scala @@ -2,7 +2,7 @@ package cats.tests import cats.evidence._ -class EvidenceTests extends CatsSuite { +class EvidenceSuite extends CatsSuite { test("Is / Leibniz") { diff --git a/tests/src/test/scala/cats/tests/FoldableTests.scala b/tests/src/test/scala/cats/tests/FoldableSuite.scala similarity index 90% rename from tests/src/test/scala/cats/tests/FoldableTests.scala rename to tests/src/test/scala/cats/tests/FoldableSuite.scala index 4d399f6b8a..ca1d55c477 100644 --- a/tests/src/test/scala/cats/tests/FoldableTests.scala +++ b/tests/src/test/scala/cats/tests/FoldableSuite.scala @@ -9,7 +9,7 @@ import cats.instances.all._ import cats.data._ import cats.laws.discipline.arbitrary._ -abstract class FoldableCheck[F[_]: Foldable](name: String)(implicit ArbFInt: Arbitrary[F[Int]], ArbFString: Arbitrary[F[String]]) extends CatsSuite with PropertyChecks { +abstract class FoldableSuite[F[_]: Foldable](name: String)(implicit ArbFInt: Arbitrary[F[Int]], ArbFString: Arbitrary[F[String]]) extends CatsSuite with PropertyChecks { def iterator[T](fa: F[T]): Iterator[T] @@ -140,7 +140,7 @@ abstract class FoldableCheck[F[_]: Foldable](name: String)(implicit ArbFInt: Arb } } -class FoldableTestsAdditional extends CatsSuite { +class FoldableSuiteAdditional extends CatsSuite { // exists method written in terms of foldRight def contains[F[_]: Foldable, A: Eq](as: F[A], goal: A): Eval[Boolean] = @@ -303,72 +303,72 @@ class FoldableTestsAdditional extends CatsSuite { } } -class FoldableListCheck extends FoldableCheck[List]("list") { +class FoldableListSuite extends FoldableSuite[List]("list") { def iterator[T](list: List[T]): Iterator[T] = list.iterator } -class FoldableVectorCheck extends FoldableCheck[Vector]("vector") { +class FoldableVectorSuite extends FoldableSuite[Vector]("vector") { def iterator[T](vector: Vector[T]): Iterator[T] = vector.iterator } -class FoldableSetCheck extends FoldableCheck[Set]("set") { +class FoldableSetSuite extends FoldableSuite[Set]("set") { def iterator[T](set: Set[T]): Iterator[T] = set.iterator } -class FoldableStreamCheck extends FoldableCheck[Stream]("stream") { +class FoldableStreamSuite extends FoldableSuite[Stream]("stream") { def iterator[T](stream: Stream[T]): Iterator[T] = stream.iterator } -class FoldableMapCheck extends FoldableCheck[Map[Int, ?]]("map") { +class FoldableMapSuite extends FoldableSuite[Map[Int, ?]]("map") { def iterator[T](map: Map[Int, T]): Iterator[T] = map.valuesIterator } -class FoldableOptionCheck extends FoldableCheck[Option]("option") { +class FoldableOptionSuite extends FoldableSuite[Option]("option") { def iterator[T](option: Option[T]): Iterator[T] = option.iterator } -class FoldableEitherCheck extends FoldableCheck[Either[Int, ?]]("either") { +class FoldableEitherSuite extends FoldableSuite[Either[Int, ?]]("either") { def iterator[T](either: Either[Int, T]): Iterator[T] = either.right.toOption.iterator } -class FoldableValidatedCheck extends FoldableCheck[Validated[String, ?]]("validated") { +class FoldableValidatedSuite extends FoldableSuite[Validated[String, ?]]("validated") { def iterator[T](validated: Validated[String, T]): Iterator[T] = validated.toOption.iterator } -class FoldableTryCheck extends FoldableCheck[Try]("try") { +class FoldableTrySuite extends FoldableSuite[Try]("try") { def iterator[T](tryt: Try[T]): Iterator[T] = tryt.toOption.iterator } -class FoldableEitherKCheck extends FoldableCheck[EitherK[Option, Option, ?]]("eitherK") { +class FoldableEitherKSuite extends FoldableSuite[EitherK[Option, Option, ?]]("eitherK") { def iterator[T](eitherK: EitherK[Option, Option, T]) = eitherK.run.bimap(_.iterator, _.iterator).merge } -class FoldableIorCheck extends FoldableCheck[Int Ior ?]("ior") { +class FoldableIorSuite extends FoldableSuite[Int Ior ?]("ior") { def iterator[T](ior: Int Ior T) = ior.fold(_ => None.iterator, b => Some(b).iterator, (_, b) => Some(b).iterator) } -class FoldableIdCheck extends FoldableCheck[Id[?]]("id") { +class FoldableIdSuite extends FoldableSuite[Id[?]]("id") { def iterator[T](id: Id[T]) = Some(id).iterator } -class FoldableIdTCheck extends FoldableCheck[IdT[Option, ?]]("idT") { +class FoldableIdTSuite extends FoldableSuite[IdT[Option, ?]]("idT") { def iterator[T](idT: IdT[Option, T]) = idT.value.iterator } -class FoldableConstCheck extends FoldableCheck[Const[Int, ?]]("const") { +class FoldableConstSuite extends FoldableSuite[Const[Int, ?]]("const") { def iterator[T](const: Const[Int, T]) = None.iterator } -class FoldableTuple2Check extends FoldableCheck[(Int, ?)]("tuple2") { +class FoldableTuple2Suite extends FoldableSuite[(Int, ?)]("tuple2") { def iterator[T](tuple: (Int, T)) = Some(tuple._2).iterator } -class FoldableOneAndCheck extends FoldableCheck[OneAnd[List, ?]]("oneAnd") { +class FoldableOneAndSuite extends FoldableSuite[OneAnd[List, ?]]("oneAnd") { def iterator[T](oneAnd: OneAnd[List, T]) = (oneAnd.head :: oneAnd.tail).iterator } -class FoldableComposedCheck extends FoldableCheck[Nested[List, Option, ?]]("nested") { +class FoldableComposedSuite extends FoldableSuite[Nested[List, Option, ?]]("nested") { def iterator[T](nested: Nested[List, Option, T]) = nested.value.collect { case Some(t) => t }.iterator diff --git a/tests/src/test/scala/cats/tests/FuncTests.scala b/tests/src/test/scala/cats/tests/FuncSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/FuncTests.scala rename to tests/src/test/scala/cats/tests/FuncSuite.scala index 8b3e8a45e4..6aec186c66 100644 --- a/tests/src/test/scala/cats/tests/FuncTests.scala +++ b/tests/src/test/scala/cats/tests/FuncSuite.scala @@ -8,7 +8,7 @@ import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import org.scalacheck.Arbitrary -class FuncTests extends CatsSuite { +class FuncSuite extends CatsSuite { import cats.laws.discipline.eq._ implicit def funcEq[F[_], A, B](implicit A: Arbitrary[A], FB: Eq[F[B]]): Eq[Func[F, A, B]] = Eq.by[Func[F, A, B], A => F[B]](_.run) diff --git a/tests/src/test/scala/cats/tests/FunctionKTests.scala b/tests/src/test/scala/cats/tests/FunctionKSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/FunctionKTests.scala rename to tests/src/test/scala/cats/tests/FunctionKSuite.scala index 513bdfbb40..bdb7816be8 100644 --- a/tests/src/test/scala/cats/tests/FunctionKTests.scala +++ b/tests/src/test/scala/cats/tests/FunctionKSuite.scala @@ -6,7 +6,7 @@ import cats.data.EitherK import cats.data.NonEmptyList import cats.laws.discipline.arbitrary._ -class FunctionKTests extends CatsSuite { +class FunctionKSuite extends CatsSuite { val listToOption = λ[FunctionK[List, Option]](_.headOption) val listToVector = λ[FunctionK[List, Vector]](_.toVector) diff --git a/tests/src/test/scala/cats/tests/FunctionTests.scala b/tests/src/test/scala/cats/tests/FunctionSuite.scala similarity index 85% rename from tests/src/test/scala/cats/tests/FunctionTests.scala rename to tests/src/test/scala/cats/tests/FunctionSuite.scala index 52784bdcb4..8b26aeb23d 100644 --- a/tests/src/test/scala/cats/tests/FunctionTests.scala +++ b/tests/src/test/scala/cats/tests/FunctionSuite.scala @@ -9,12 +9,12 @@ import cats.kernel.laws.discipline.{ CommutativeGroupTests, CommutativeMonoidTests, CommutativeSemigroupTests, - EqTests => EqLawTests, - GroupTests => GroupLawTests, - MonoidTests => MonoidLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - SemigroupTests => SemigroupLawTests, + EqTests, + GroupTests, + MonoidTests, + OrderTests, + PartialOrderTests, + SemigroupTests, SemilatticeTests, SerializableTests } @@ -25,7 +25,7 @@ import cats.kernel.{CommutativeGroup, CommutativeMonoid, CommutativeSemigroup} import cats.kernel.{Band, BoundedSemilattice, Semilattice} -class FunctionTests extends CatsSuite { +class FunctionSuite extends CatsSuite { import Helpers._ @@ -56,17 +56,17 @@ class FunctionTests extends CatsSuite { // law checks for the various Function0-related instances - checkAll("Function0[Eqed]", EqLawTests[Function0[Eqed]].eqv) - checkAll("Function0[POrd]", PartialOrderLawTests[Function0[POrd]].partialOrder) - checkAll("Function0[Ord]", OrderLawTests[Function0[Ord]].order) - checkAll("Function0[Semi]", SemigroupLawTests[Function0[Semi]].semigroup) + checkAll("Function0[Eqed]", EqTests[Function0[Eqed]].eqv) + checkAll("Function0[POrd]", PartialOrderTests[Function0[POrd]].partialOrder) + checkAll("Function0[Ord]", OrderTests[Function0[Ord]].order) + checkAll("Function0[Semi]", SemigroupTests[Function0[Semi]].semigroup) checkAll("Function0[CSemi]", CommutativeSemigroupTests[Function0[CSemi]].commutativeSemigroup) checkAll("Function0[Bnd]", BandTests[Function0[Bnd]].band) checkAll("Function0[SL]", SemilatticeTests[Function0[SL]].semilattice) checkAll("Function0[BSL]", BoundedSemilatticeTests[Function0[BSL]].boundedSemilattice) - checkAll("Function0[Mono]", MonoidLawTests[Function0[Mono]].monoid) + checkAll("Function0[Mono]", MonoidTests[Function0[Mono]].monoid) checkAll("Function0[CMono]", CommutativeMonoidTests[Function0[CMono]].commutativeMonoid) - checkAll("Function0[Grp]", GroupLawTests[Function0[Grp]].group) + checkAll("Function0[Grp]", GroupTests[Function0[Grp]].group) checkAll("Function0[CGrp]", CommutativeGroupTests[Function0[CGrp]].commutativeGroup) test("Function0[Hsh]") { @@ -92,14 +92,14 @@ class FunctionTests extends CatsSuite { // law checks for the various Function1-related instances - checkAll("Function1[String, Semi]", SemigroupLawTests[Function1[String, Semi]].semigroup) + checkAll("Function1[String, Semi]", SemigroupTests[Function1[String, Semi]].semigroup) checkAll("Function1[String, CSemi]", CommutativeSemigroupTests[Function1[String, CSemi]].commutativeSemigroup) checkAll("Function1[String, Bnd]", BandTests[Function1[String, Bnd]].band) checkAll("Function1[String, SL]", SemilatticeTests[Function1[String, SL]].semilattice) checkAll("Function1[String, BSL]", BoundedSemilatticeTests[Function1[String, BSL]].boundedSemilattice) - checkAll("Function1[String, Mono]", MonoidLawTests[Function1[String, Mono]].monoid) + checkAll("Function1[String, Mono]", MonoidTests[Function1[String, Mono]].monoid) checkAll("Function1[String, CMono]", CommutativeMonoidTests[Function1[String, CMono]].commutativeMonoid) - checkAll("Function1[String, Grp]", GroupLawTests[Function1[String, Grp]].group) + checkAll("Function1[String, Grp]", GroupTests[Function1[String, Grp]].group) checkAll("Function1[String, CGrp]", CommutativeGroupTests[Function1[String, CGrp]].commutativeGroup) // serialization tests for the various Function1-related instances diff --git a/tests/src/test/scala/cats/tests/FunctorTests.scala b/tests/src/test/scala/cats/tests/FunctorSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/FunctorTests.scala rename to tests/src/test/scala/cats/tests/FunctorSuite.scala index e98940b61f..3b7c74ace0 100644 --- a/tests/src/test/scala/cats/tests/FunctorTests.scala +++ b/tests/src/test/scala/cats/tests/FunctorSuite.scala @@ -1,7 +1,7 @@ package cats package tests -class FunctorTest extends CatsSuite { +class FunctorSuite extends CatsSuite { test("void replaces values with unit preserving structure") { forAll { (l: List[Int], o: Option[Int], m: Map[String, Int]) => l.void should === (List.fill(l.length)(())) diff --git a/tests/src/test/scala/cats/tests/GroupTests.scala b/tests/src/test/scala/cats/tests/GroupSuite.scala similarity index 73% rename from tests/src/test/scala/cats/tests/GroupTests.scala rename to tests/src/test/scala/cats/tests/GroupSuite.scala index 8ba012e322..eab792894c 100644 --- a/tests/src/test/scala/cats/tests/GroupTests.scala +++ b/tests/src/test/scala/cats/tests/GroupSuite.scala @@ -1,9 +1,9 @@ package cats package tests -import cats.kernel.laws.discipline.{GroupTests => GroupLawTests} +import cats.kernel.laws.discipline.GroupTests -class GroupTests extends CatsSuite { +class GroupSuite extends CatsSuite { test("combine minValue") { Group[Int].combineN(1, Int.MinValue) should ===(Int.MinValue) } @@ -18,9 +18,9 @@ class GroupTests extends CatsSuite { Group[Int].remove(1, 2) should ===(-1) } - checkAll("Int", GroupLawTests[Int].group) + checkAll("Int", GroupTests[Int].group) // float and double are *not* associative, and scalacheck knows // checkAll("Double", GroupLaws[Double].group) // checkAll("Float", GroupLaws[Float].group) - checkAll("Long", GroupLawTests[Long].group) + checkAll("Long", GroupTests[Long].group) } diff --git a/tests/src/test/scala/cats/tests/HashTests.scala b/tests/src/test/scala/cats/tests/HashSuite.scala similarity index 81% rename from tests/src/test/scala/cats/tests/HashTests.scala rename to tests/src/test/scala/cats/tests/HashSuite.scala index 037122b2a6..908b9a9bcd 100644 --- a/tests/src/test/scala/cats/tests/HashTests.scala +++ b/tests/src/test/scala/cats/tests/HashSuite.scala @@ -2,7 +2,7 @@ package cats package tests -class HashTests extends CatsSuite { +class HashSuite extends CatsSuite { { Invariant[Hash] diff --git a/tests/src/test/scala/cats/tests/IdTests.scala b/tests/src/test/scala/cats/tests/IdSuite.scala similarity index 95% rename from tests/src/test/scala/cats/tests/IdTests.scala rename to tests/src/test/scala/cats/tests/IdSuite.scala index 1040a08abd..f2467a9ae9 100644 --- a/tests/src/test/scala/cats/tests/IdTests.scala +++ b/tests/src/test/scala/cats/tests/IdSuite.scala @@ -3,7 +3,7 @@ package tests import cats.laws.discipline._ -class IdTests extends CatsSuite { +class IdSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Id] checkAll("Id[Int]", BimonadTests[Id].bimonad[Int, Int, Int]) diff --git a/tests/src/test/scala/cats/tests/IdTTests.scala b/tests/src/test/scala/cats/tests/IdTSuite.scala similarity index 91% rename from tests/src/test/scala/cats/tests/IdTTests.scala rename to tests/src/test/scala/cats/tests/IdTSuite.scala index c6739f50a3..e3f1f65f89 100644 --- a/tests/src/test/scala/cats/tests/IdTTests.scala +++ b/tests/src/test/scala/cats/tests/IdTSuite.scala @@ -2,28 +2,25 @@ package cats package tests import cats.data.{IdT, NonEmptyList} -import cats.kernel.laws.discipline.{ - OrderTests => OrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{OrderTests, EqTests} import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ -class IdTTests extends CatsSuite { +class IdTSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[IdT[ListWrapper, ?]](IdT.catsDataFunctorForIdT(ListWrapper.functor)) { implicit val F = ListWrapper.eqv[Option[Int]] - checkAll("IdT[ListWrapper, Int]", EqLawTests[IdT[ListWrapper, Int]].eqv) + checkAll("IdT[ListWrapper, Int]", EqTests[IdT[ListWrapper, Int]].eqv) checkAll("Eq[IdT[ListWrapper, Int]]", SerializableTests.serializable(Eq[IdT[ListWrapper, Int]])) } { implicit val F = ListWrapper.order[Int] - checkAll("IdT[ListWrapper, Int]", OrderLawTests[IdT[ListWrapper, Int]].order) + checkAll("IdT[ListWrapper, Int]", OrderTests[IdT[ListWrapper, Int]].order) checkAll("Order[IdT[ListWrapper, Int]]", SerializableTests.serializable(Order[IdT[ListWrapper, Int]])) } diff --git a/tests/src/test/scala/cats/tests/IndexedReaderWriterStateTTests.scala b/tests/src/test/scala/cats/tests/IndexedReaderWriterStateTTests.scala index e319f8ccfa..45748955ea 100644 --- a/tests/src/test/scala/cats/tests/IndexedReaderWriterStateTTests.scala +++ b/tests/src/test/scala/cats/tests/IndexedReaderWriterStateTTests.scala @@ -9,8 +9,8 @@ import cats.laws.discipline.arbitrary._ import org.scalacheck.Arbitrary import cats.arrow.{Strong, Profunctor} -class ReaderWriterStateTTests extends CatsSuite { - import ReaderWriterStateTTests._ +class ReaderWriterStateTSuite extends CatsSuite { + import ReaderWriterStateTSuite._ test("Basic ReaderWriterState usage") { forAll { (context: String, initial: Int) => @@ -375,7 +375,7 @@ class ReaderWriterStateTTests extends CatsSuite { } -object ReaderWriterStateTTests { +object ReaderWriterStateTSuite { def addAndLog(i: Int): ReaderWriterState[String, Vector[String], Int, Int] = { import cats.instances.vector._ diff --git a/tests/src/test/scala/cats/tests/IndexedStateTTests.scala b/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/IndexedStateTTests.scala rename to tests/src/test/scala/cats/tests/IndexedStateTSuite.scala index 04609d4cf8..a708a0b64f 100644 --- a/tests/src/test/scala/cats/tests/IndexedStateTTests.scala +++ b/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala @@ -11,12 +11,12 @@ import cats.laws.discipline.eq._ import cats.laws.discipline.arbitrary._ import org.scalacheck.Arbitrary -class IndexedStateTTests extends CatsSuite { +class IndexedStateTSuite extends CatsSuite { implicit override val generatorDrivenConfig: PropertyCheckConfiguration = checkConfiguration.copy(sizeRange = 5) - import IndexedStateTTests._ + import IndexedStateTSuite._ test("basic state usage"){ add1.run(1).value should === (2 -> 1) @@ -383,14 +383,14 @@ class IndexedStateTTests extends CatsSuite { } -object IndexedStateTTests extends IndexedStateTTestsInstances { +object IndexedStateTSuite extends IndexedStateTSuiteInstances { implicit def stateEq[S:Eq:Arbitrary, A:Eq]: Eq[State[S, A]] = indexedStateTEq[Eval, S, S, A] val add1: State[Int, Int] = State(n => (n + 1, n)) } -sealed trait IndexedStateTTestsInstances { +sealed trait IndexedStateTSuiteInstances { implicit def indexedStateTEq[F[_], SA, SB, A](implicit SA: Arbitrary[SA], FSB: Eq[F[(SB, A)]], F: FlatMap[F]): Eq[IndexedStateT[F, SA, SB, A]] = Eq.by[IndexedStateT[F, SA, SB, A], SA => F[(SB, A)]](state => diff --git a/tests/src/test/scala/cats/tests/InjectKTests.scala b/tests/src/test/scala/cats/tests/InjectKSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/InjectKTests.scala rename to tests/src/test/scala/cats/tests/InjectKSuite.scala index 991c57952a..f057e5ec00 100644 --- a/tests/src/test/scala/cats/tests/InjectKTests.scala +++ b/tests/src/test/scala/cats/tests/InjectKSuite.scala @@ -1,11 +1,11 @@ package cats import cats.data.EitherK -import cats.laws.discipline.{ InjectKTests => InjectKTypeclassTests } +import cats.laws.discipline.InjectKTests import cats.tests.CatsSuite import org.scalacheck._ -class InjectKTests extends CatsSuite { +class InjectKSuite extends CatsSuite { sealed trait Test1Algebra[A] @@ -107,6 +107,6 @@ class InjectKTests extends CatsSuite { InjectK.catsReflexiveInjectKInstance[List].prj[Int](listIntNull) should ===(Some(listIntNull)) } - checkAll("InjectK[Test1Algebra, T]", InjectKTypeclassTests[Test1Algebra, T].injectK[String]) - checkAll("InjectK[Test2Algebra, T]", InjectKTypeclassTests[Test2Algebra, T].injectK[String]) + checkAll("InjectK[Test1Algebra, T]", InjectKTests[Test1Algebra, T].injectK[String]) + checkAll("InjectK[Test2Algebra, T]", InjectKTests[Test2Algebra, T].injectK[String]) } diff --git a/tests/src/test/scala/cats/tests/InjectTests.scala b/tests/src/test/scala/cats/tests/InjectSuite.scala similarity index 84% rename from tests/src/test/scala/cats/tests/InjectTests.scala rename to tests/src/test/scala/cats/tests/InjectSuite.scala index 2d667d6dee..60fb8c3fef 100644 --- a/tests/src/test/scala/cats/tests/InjectTests.scala +++ b/tests/src/test/scala/cats/tests/InjectSuite.scala @@ -1,9 +1,9 @@ package cats -import cats.laws.discipline.{ InjectTests => InjectTypeclassTests } +import cats.laws.discipline.InjectTests import cats.tests.CatsSuite -class InjectTests extends CatsSuite { +class InjectSuite extends CatsSuite { type StringOrInt = Either[String, Int] @@ -63,6 +63,6 @@ class InjectTests extends CatsSuite { Inject.catsReflexiveInjectInstance[String].prj(stringNull) should ===(Some(stringNull)) } - checkAll("Inject[String, StringOrInt]", InjectTypeclassTests[String, StringOrInt].inject) - checkAll("Inject[Int, StringOrInt]", InjectTypeclassTests[Int, StringOrInt].inject) + checkAll("Inject[String, StringOrInt]", InjectTests[String, StringOrInt].inject) + checkAll("Inject[Int, StringOrInt]", InjectTests[Int, StringOrInt].inject) } diff --git a/tests/src/test/scala/cats/tests/IorTests.scala b/tests/src/test/scala/cats/tests/IorSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/IorTests.scala rename to tests/src/test/scala/cats/tests/IorSuite.scala index fe4b0d7569..81b93be4fd 100644 --- a/tests/src/test/scala/cats/tests/IorTests.scala +++ b/tests/src/test/scala/cats/tests/IorSuite.scala @@ -1,13 +1,13 @@ package cats package tests -import cats.kernel.laws.discipline.{SemigroupTests => SemigroupLawTests} +import cats.kernel.laws.discipline.SemigroupTests import cats.laws.discipline.{BifunctorTests, SemigroupalTests, MonadErrorTests, SerializableTests, TraverseTests} import cats.data.{Ior, NonEmptyList, EitherT} import cats.laws.discipline.arbitrary._ import org.scalacheck.Arbitrary._ -class IorTests extends CatsSuite { +class IorSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Ior[String, ?]] @@ -23,7 +23,7 @@ class IorTests extends CatsSuite { checkAll("Traverse[String Ior ?]", SerializableTests.serializable(Traverse[String Ior ?])) checkAll("? Ior ?", BifunctorTests[Ior].bifunctor[Int, Int, Int, String, String, String]) - checkAll("Semigroup[Ior[A: Semigroup, B: Semigroup]]", SemigroupLawTests[Ior[List[Int], List[Int]]].semigroup) + checkAll("Semigroup[Ior[A: Semigroup, B: Semigroup]]", SemigroupTests[Ior[List[Int], List[Int]]].semigroup) checkAll("SerializableTest Semigroup[Ior[A: Semigroup, B: Semigroup]]", SerializableTests.serializable(Semigroup[Ior[List[Int], List[Int]]])) test("left Option is defined left and both") { diff --git a/tests/src/test/scala/cats/tests/IsTests.scala b/tests/src/test/scala/cats/tests/IsSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/IsTests.scala rename to tests/src/test/scala/cats/tests/IsSuite.scala index fba2ebe63b..6d2ef5050a 100644 --- a/tests/src/test/scala/cats/tests/IsTests.scala +++ b/tests/src/test/scala/cats/tests/IsSuite.scala @@ -1,7 +1,7 @@ package cats package tests -class IsTests extends CatsSuite { +class IsSuite extends CatsSuite { import evidence._ test("syntax") { diff --git a/tests/src/test/scala/cats/tests/KernelContravariantTests.scala b/tests/src/test/scala/cats/tests/KernelContravariantSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/KernelContravariantTests.scala rename to tests/src/test/scala/cats/tests/KernelContravariantSuite.scala index 0aefd2e63f..39bf707198 100644 --- a/tests/src/test/scala/cats/tests/KernelContravariantTests.scala +++ b/tests/src/test/scala/cats/tests/KernelContravariantSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline._ import cats.laws.discipline.eq._ -class KernelContravariantTests extends CatsSuite { +class KernelContravariantSuite extends CatsSuite { Invariant[Eq] Contravariant[Eq] Semigroupal[Eq] diff --git a/tests/src/test/scala/cats/tests/KleisliTests.scala b/tests/src/test/scala/cats/tests/KleisliSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/KleisliTests.scala rename to tests/src/test/scala/cats/tests/KleisliSuite.scala index 1e45dcce7b..f6e9029454 100644 --- a/tests/src/test/scala/cats/tests/KleisliTests.scala +++ b/tests/src/test/scala/cats/tests/KleisliSuite.scala @@ -8,10 +8,10 @@ import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ import org.scalacheck.Arbitrary -import cats.kernel.laws.discipline.{MonoidTests => MonoidLawTests, SemigroupTests => SemigroupLawTests} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests} import cats.laws.discipline.{SemigroupKTests, MonoidKTests} -class KleisliTests extends CatsSuite { +class KleisliSuite extends CatsSuite { implicit def kleisliEq[F[_], A, B](implicit A: Arbitrary[A], FB: Eq[F[B]]): Eq[Kleisli[F, A, B]] = Eq.by[Kleisli[F, A, B], A => F[B]](_.run) @@ -107,13 +107,13 @@ class KleisliTests extends CatsSuite { { implicit val catsDataMonoidForKleisli = Kleisli.catsDataMonoidForKleisli[Option, Int, String] - checkAll("Kleisli[Option, Int, String]", MonoidLawTests[Kleisli[Option, Int, String]].monoid) + checkAll("Kleisli[Option, Int, String]", MonoidTests[Kleisli[Option, Int, String]].monoid) checkAll("Monoid[Kleisli[Option, Int, String]]", SerializableTests.serializable(catsDataMonoidForKleisli)) } { implicit val catsDataSemigroupForKleisli = Kleisli.catsDataSemigroupForKleisli[Option, Int, String] - checkAll("Kleisli[Option, Int, String]", SemigroupLawTests[Kleisli[Option, Int, String]].semigroup) + checkAll("Kleisli[Option, Int, String]", SemigroupTests[Kleisli[Option, Int, String]].semigroup) checkAll("Semigroup[Kleisli[Option, Int, String]]", SerializableTests.serializable(catsDataSemigroupForKleisli)) } diff --git a/tests/src/test/scala/cats/tests/ListTests.scala b/tests/src/test/scala/cats/tests/ListSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/ListTests.scala rename to tests/src/test/scala/cats/tests/ListSuite.scala index 2b28f3dbd5..8f881438f2 100644 --- a/tests/src/test/scala/cats/tests/ListTests.scala +++ b/tests/src/test/scala/cats/tests/ListSuite.scala @@ -5,7 +5,7 @@ import cats.data.NonEmptyList import cats.laws.discipline.{TraverseTests, CoflatMapTests, AlternativeTests, SerializableTests, SemigroupalTests} import cats.laws.discipline.arbitrary._ -class ListTests extends CatsSuite { +class ListSuite extends CatsSuite { checkAll("List[Int]", SemigroupalTests[List].semigroupal[Int, Int, Int]) checkAll("Semigroupal[List]", SerializableTests.serializable(Semigroupal[List])) diff --git a/tests/src/test/scala/cats/tests/MapTests.scala b/tests/src/test/scala/cats/tests/MapSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/MapTests.scala rename to tests/src/test/scala/cats/tests/MapSuite.scala index b4d403cbd0..3287a429a6 100644 --- a/tests/src/test/scala/cats/tests/MapTests.scala +++ b/tests/src/test/scala/cats/tests/MapSuite.scala @@ -3,7 +3,7 @@ package tests import cats.laws.discipline.{TraverseTests, FlatMapTests, SerializableTests, SemigroupalTests} -class MapTests extends CatsSuite { +class MapSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Map[Int, ?]] checkAll("Map[Int, Int]", SemigroupalTests[Map[Int, ?]].semigroupal[Int, Int, Int]) diff --git a/tests/src/test/scala/cats/tests/MonadCombineTests.scala b/tests/src/test/scala/cats/tests/MonadCombineSuite.scala similarity index 87% rename from tests/src/test/scala/cats/tests/MonadCombineTests.scala rename to tests/src/test/scala/cats/tests/MonadCombineSuite.scala index fbe83aea5f..2176a2e361 100644 --- a/tests/src/test/scala/cats/tests/MonadCombineTests.scala +++ b/tests/src/test/scala/cats/tests/MonadCombineSuite.scala @@ -1,7 +1,7 @@ package cats package tests -class MonadCombineTest extends CatsSuite { +class MonadCombineSuite extends CatsSuite { test("separate") { forAll { (list: List[Either[Int, String]]) => val ints = list.collect { case Left(i) => i } diff --git a/tests/src/test/scala/cats/tests/MonadTest.scala b/tests/src/test/scala/cats/tests/MonadSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/MonadTest.scala rename to tests/src/test/scala/cats/tests/MonadSuite.scala index 3232174ac2..25d2b3ac14 100644 --- a/tests/src/test/scala/cats/tests/MonadTest.scala +++ b/tests/src/test/scala/cats/tests/MonadSuite.scala @@ -4,7 +4,7 @@ package tests import cats.data.{IndexedStateT, StateT} import org.scalacheck.Gen -class MonadTest extends CatsSuite { +class MonadSuite extends CatsSuite { implicit val testInstance: Monad[StateT[Id, Int, ?]] = IndexedStateT.catsDataMonadForIndexedStateT[Id, Int] val smallPosInt = Gen.choose(1, 5000) diff --git a/tests/src/test/scala/cats/tests/MonoidTests.scala b/tests/src/test/scala/cats/tests/MonoidSuite.scala similarity index 85% rename from tests/src/test/scala/cats/tests/MonoidTests.scala rename to tests/src/test/scala/cats/tests/MonoidSuite.scala index 0c79df4c63..b96a146418 100644 --- a/tests/src/test/scala/cats/tests/MonoidTests.scala +++ b/tests/src/test/scala/cats/tests/MonoidSuite.scala @@ -3,7 +3,7 @@ package tests -class MonoidTests extends CatsSuite { +class MonoidSuite extends CatsSuite { { Invariant[Monoid] Semigroupal[Monoid] @@ -16,7 +16,7 @@ class MonoidTests extends CatsSuite { } } -object MonoidTests { +object MonoidSuite { def summonInstance(): Unit = { Invariant[Monoid] Semigroupal[Monoid] diff --git a/tests/src/test/scala/cats/tests/NestedTests.scala b/tests/src/test/scala/cats/tests/NestedSuite.scala similarity index 99% rename from tests/src/test/scala/cats/tests/NestedTests.scala rename to tests/src/test/scala/cats/tests/NestedSuite.scala index 3bf0425f75..2709ef832d 100644 --- a/tests/src/test/scala/cats/tests/NestedTests.scala +++ b/tests/src/test/scala/cats/tests/NestedSuite.scala @@ -9,7 +9,7 @@ import cats.laws.discipline.SemigroupalTests.Isomorphisms._ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq.catsLawsEqForShow -class NestedTests extends CatsSuite { +class NestedSuite extends CatsSuite { // we have a lot of generated lists of lists in these tests. We have to tell // Scalacheck to calm down a bit so we don't hit memory and test duration // issues. diff --git a/tests/src/test/scala/cats/tests/nonEmptyListTests.scala b/tests/src/test/scala/cats/tests/NonEmptyListSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/nonEmptyListTests.scala rename to tests/src/test/scala/cats/tests/NonEmptyListSuite.scala index 225f7a5f0e..b863d4c61f 100644 --- a/tests/src/test/scala/cats/tests/nonEmptyListTests.scala +++ b/tests/src/test/scala/cats/tests/NonEmptyListSuite.scala @@ -1,23 +1,18 @@ package cats package tests -import cats.kernel.laws.discipline.{ - SemigroupTests => SemigroupLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{SemigroupTests, OrderTests, PartialOrderTests, EqTests} import cats.data.{NonEmptyList, NonEmptyVector} import cats.laws.discipline.arbitrary._ import cats.laws.discipline.{ComonadTests, NonEmptyTraverseTests, MonadTests, ReducibleTests, SemigroupKTests, SerializableTests} -class NonEmptyListTests extends CatsSuite { +class NonEmptyListSuite extends CatsSuite { // Lots of collections here.. telling ScalaCheck to calm down a bit implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) - checkAll("NonEmptyList[Int]", OrderLawTests[NonEmptyList[Int]].order) + checkAll("NonEmptyList[Int]", OrderTests[NonEmptyList[Int]].order) checkAll("NonEmptyList[Int] with Option", NonEmptyTraverseTests[NonEmptyList].nonEmptyTraverse[Option, Int, Int, Int, Int, Option, Option]) checkAll("NonEmptyTraverse[NonEmptyList[A]]", SerializableTests.serializable(NonEmptyTraverse[NonEmptyList])) @@ -31,18 +26,18 @@ class NonEmptyListTests extends CatsSuite { checkAll("NonEmptyList[Int]", SemigroupKTests[NonEmptyList].semigroupK[Int]) checkAll("SemigroupK[NonEmptyList[A]]", SerializableTests.serializable(SemigroupK[NonEmptyList])) - checkAll("NonEmptyList[Int]", SemigroupLawTests[NonEmptyList[Int]].semigroup) + checkAll("NonEmptyList[Int]", SemigroupTests[NonEmptyList[Int]].semigroup) checkAll("Semigroup[NonEmptyList[Int]]", SerializableTests.serializable(Semigroup[NonEmptyList[Int]])) checkAll("NonEmptyList[Int]", ComonadTests[NonEmptyList].comonad[Int, Int, Int]) checkAll("Comonad[NonEmptyList]", SerializableTests.serializable(Comonad[NonEmptyList])) - checkAll("NonEmptyList[ListWrapper[Int]]", EqLawTests[NonEmptyList[ListWrapper[Int]]].eqv) + checkAll("NonEmptyList[ListWrapper[Int]]", EqTests[NonEmptyList[ListWrapper[Int]]].eqv) checkAll("Eq[NonEmptyList[ListWrapper[Int]]]", SerializableTests.serializable(Eq[NonEmptyList[ListWrapper[Int]]])) { implicit val A = ListWrapper.partialOrder[Int] - checkAll("NonEmptyList[ListWrapper[Int]]", PartialOrderLawTests[NonEmptyList[ListWrapper[Int]]].partialOrder) + checkAll("NonEmptyList[ListWrapper[Int]]", PartialOrderTests[NonEmptyList[ListWrapper[Int]]].partialOrder) checkAll("PartialOrder[NonEmptyList[ListWrapper[Int]]]", SerializableTests.serializable(PartialOrder[NonEmptyList[ListWrapper[Int]]])) Eq[NonEmptyList[ListWrapper[Int]]] @@ -50,7 +45,7 @@ class NonEmptyListTests extends CatsSuite { { implicit val A = ListWrapper.order[Int] - checkAll("NonEmptyList[ListWrapper[Int]]", OrderLawTests[NonEmptyList[ListWrapper[Int]]].order) + checkAll("NonEmptyList[ListWrapper[Int]]", OrderTests[NonEmptyList[ListWrapper[Int]]].order) checkAll("Order[NonEmptyList[ListWrapper[Int]]]", SerializableTests.serializable(Order[NonEmptyList[ListWrapper[Int]]])) Eq[NonEmptyList[ListWrapper[Int]]] @@ -323,7 +318,7 @@ class NonEmptyListTests extends CatsSuite { } @deprecated("to be able to test deprecated methods", since = "1.0.0-RC1") -class DeprecatedNonEmptyListTests extends CatsSuite { +class DeprecatedNonEmptyListSuite extends CatsSuite { test("Deprecated NonEmptyList#concat is consistent with List#:::") { forAll { (nel: NonEmptyList[Int], l: List[Int], n: Int) => @@ -332,7 +327,7 @@ class DeprecatedNonEmptyListTests extends CatsSuite { } } -class ReducibleNonEmptyListCheck extends ReducibleCheck[NonEmptyList]("NonEmptyList") { +class ReducibleNonEmptyListSuite extends ReducibleSuite[NonEmptyList]("NonEmptyList") { def iterator[T](nel: NonEmptyList[T]): Iterator[T] = nel.toList.iterator def range(start: Long, endInclusive: Long): NonEmptyList[Long] = { diff --git a/tests/src/test/scala/cats/tests/NonEmptyVectorTests.scala b/tests/src/test/scala/cats/tests/NonEmptyVectorSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/NonEmptyVectorTests.scala rename to tests/src/test/scala/cats/tests/NonEmptyVectorSuite.scala index 7bd91690d0..17b5d6c072 100644 --- a/tests/src/test/scala/cats/tests/NonEmptyVectorTests.scala +++ b/tests/src/test/scala/cats/tests/NonEmptyVectorSuite.scala @@ -3,10 +3,7 @@ package tests import catalysts.Platform -import cats.kernel.laws.discipline.{ - SemigroupTests => SemigroupLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{SemigroupTests, EqTests} import cats.data.NonEmptyVector import cats.laws.discipline.{ComonadTests, SemigroupKTests, FoldableTests, SerializableTests, NonEmptyTraverseTests, ReducibleTests, MonadTests} @@ -14,12 +11,12 @@ import cats.laws.discipline.arbitrary._ import scala.util.Properties -class NonEmptyVectorTests extends CatsSuite { +class NonEmptyVectorSuite extends CatsSuite { // Lots of collections here.. telling ScalaCheck to calm down a bit implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) - checkAll("NonEmptyVector[Int]", EqLawTests[NonEmptyVector[Int]].eqv) + checkAll("NonEmptyVector[Int]", EqTests[NonEmptyVector[Int]].eqv) checkAll("NonEmptyVector[Int] with Option", NonEmptyTraverseTests[NonEmptyVector].nonEmptyTraverse[Option, Int, Int, Int, Int, Option, Option]) checkAll("NonEmptyTraverse[NonEmptyVector[A]]", SerializableTests.serializable(NonEmptyTraverse[NonEmptyVector])) @@ -31,7 +28,7 @@ class NonEmptyVectorTests extends CatsSuite { // Test instances that have more general constraints checkAll("NonEmptyVector[Int]", SemigroupKTests[NonEmptyVector].semigroupK[Int]) - checkAll("NonEmptyVector[Int]", SemigroupLawTests[NonEmptyVector[Int]].semigroup) + checkAll("NonEmptyVector[Int]", SemigroupTests[NonEmptyVector[Int]].semigroup) checkAll("SemigroupK[NonEmptyVector]", SerializableTests.serializable(SemigroupK[NonEmptyVector])) checkAll("Semigroup[NonEmptyVector[Int]]", SerializableTests.serializable(Semigroup[NonEmptyVector[Int]])) @@ -391,7 +388,7 @@ class NonEmptyVectorTests extends CatsSuite { } } -class ReducibleNonEmptyVectorCheck extends ReducibleCheck[NonEmptyVector]("NonEmptyVector") { +class ReducibleNonEmptyVectorSuite extends ReducibleSuite[NonEmptyVector]("NonEmptyVector") { def iterator[T](nel: NonEmptyVector[T]): Iterator[T] = nel.toVector.iterator def range(start: Long, endInclusive: Long): NonEmptyVector[Long] = { diff --git a/tests/src/test/scala/cats/tests/OneAndTests.scala b/tests/src/test/scala/cats/tests/OneAndSuite.scala similarity index 95% rename from tests/src/test/scala/cats/tests/OneAndTests.scala rename to tests/src/test/scala/cats/tests/OneAndSuite.scala index d344cc8ab4..57f7d2479d 100644 --- a/tests/src/test/scala/cats/tests/OneAndTests.scala +++ b/tests/src/test/scala/cats/tests/OneAndSuite.scala @@ -1,22 +1,19 @@ package cats package tests -import cats.kernel.laws.discipline.{ - SemigroupTests => SemigroupLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{SemigroupTests, EqTests} import cats.instances.stream._ import cats.data.{NonEmptyStream, OneAnd} import cats.laws.discipline.{ComonadTests, FunctorTests, SemigroupKTests, FoldableTests, MonadTests, SerializableTests, SemigroupalTests, TraverseTests, NonEmptyTraverseTests, ReducibleTests} import cats.laws.discipline.arbitrary._ -class OneAndTests extends CatsSuite { +class OneAndSuite extends CatsSuite { // Lots of collections here.. telling ScalaCheck to calm down a bit implicit override val generatorDrivenConfig: PropertyCheckConfiguration = PropertyCheckConfiguration(minSuccessful = 20, sizeRange = 5) - checkAll("OneAnd[Stream, Int]", EqLawTests[OneAnd[Stream, Int]].eqv) + checkAll("OneAnd[Stream, Int]", EqTests[OneAnd[Stream, Int]].eqv) checkAll("OneAnd[Stream, Int] with Option", NonEmptyTraverseTests[OneAnd[Stream, ?]].nonEmptyTraverse[Option, Int, Int, Int, Int, Option, Option]) checkAll("NonEmptyTraverse[OneAnd[Stream, A]]", SerializableTests.serializable(NonEmptyTraverse[OneAnd[Stream, ?]])) @@ -49,7 +46,7 @@ class OneAndTests extends CatsSuite { { implicit val alternative = ListWrapper.alternative checkAll("OneAnd[ListWrapper, Int]", SemigroupKTests[OneAnd[ListWrapper, ?]].semigroupK[Int]) - checkAll("OneAnd[Stream, Int]", SemigroupLawTests[OneAnd[Stream, Int]].semigroup) + checkAll("OneAnd[Stream, Int]", SemigroupTests[OneAnd[Stream, Int]].semigroup) checkAll("SemigroupK[OneAnd[ListWrapper, A]]", SerializableTests.serializable(SemigroupK[OneAnd[ListWrapper, ?]])) checkAll("Semigroup[NonEmptyStream[Int]]", SerializableTests.serializable(Semigroup[OneAnd[Stream, Int]])) } @@ -199,7 +196,7 @@ class OneAndTests extends CatsSuite { } -class ReducibleNonEmptyStreamCheck extends ReducibleCheck[NonEmptyStream]("NonEmptyStream") { +class ReducibleNonEmptyStreamSuite extends ReducibleSuite[NonEmptyStream]("NonEmptyStream") { def iterator[T](nes: NonEmptyStream[T]): Iterator[T] = (nes.head #:: nes.tail).iterator diff --git a/tests/src/test/scala/cats/tests/OptionTests.scala b/tests/src/test/scala/cats/tests/OptionSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/OptionTests.scala rename to tests/src/test/scala/cats/tests/OptionSuite.scala index a9aef3ce54..1b88cc6750 100644 --- a/tests/src/test/scala/cats/tests/OptionTests.scala +++ b/tests/src/test/scala/cats/tests/OptionSuite.scala @@ -4,7 +4,7 @@ package tests import cats.laws.{ApplicativeLaws, CoflatMapLaws, FlatMapLaws, MonadLaws} import cats.laws.discipline._ -class OptionTests extends CatsSuite { +class OptionSuite extends CatsSuite { checkAll("Option[Int]", SemigroupalTests[Option].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Option]", SerializableTests.serializable(Semigroupal[Option])) diff --git a/tests/src/test/scala/cats/tests/OptionTTests.scala b/tests/src/test/scala/cats/tests/OptionTSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/OptionTTests.scala rename to tests/src/test/scala/cats/tests/OptionTSuite.scala index 705cdc610c..8bc3751d85 100644 --- a/tests/src/test/scala/cats/tests/OptionTTests.scala +++ b/tests/src/test/scala/cats/tests/OptionTSuite.scala @@ -2,30 +2,24 @@ package cats package tests import cats.data.OptionT -import cats.kernel.laws.discipline.{ - MonoidTests => MonoidLawTests, - SemigroupTests => SemigroupLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, OrderTests, PartialOrderTests, EqTests} import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ -class OptionTTests extends CatsSuite { +class OptionTSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[OptionT[ListWrapper, ?]](OptionT.catsDataFunctorForOptionT(ListWrapper.functor)) { implicit val F = ListWrapper.eqv[Option[Int]] - checkAll("OptionT[ListWrapper, Int]", EqLawTests[OptionT[ListWrapper, Int]].eqv) + checkAll("OptionT[ListWrapper, Int]", EqTests[OptionT[ListWrapper, Int]].eqv) checkAll("Eq[OptionT[ListWrapper, Int]]", SerializableTests.serializable(Eq[OptionT[ListWrapper, Int]])) } { implicit val F = ListWrapper.partialOrder[Option[Int]] - checkAll("OptionT[ListWrapper, Int]", PartialOrderLawTests[OptionT[ListWrapper, Int]].partialOrder) + checkAll("OptionT[ListWrapper, Int]", PartialOrderTests[OptionT[ListWrapper, Int]].partialOrder) checkAll("PartialOrder[OptionT[ListWrapper, Int]]", SerializableTests.serializable(PartialOrder[OptionT[ListWrapper, Int]])) Eq[OptionT[ListWrapper, Int]] @@ -34,7 +28,7 @@ class OptionTTests extends CatsSuite { { implicit val F = ListWrapper.order[Option[Int]] - checkAll("OptionT[ListWrapper, Int]", OrderLawTests[OptionT[ListWrapper, Int]].order) + checkAll("OptionT[ListWrapper, Int]", OrderTests[OptionT[ListWrapper, Int]].order) checkAll("Order[OptionT[ListWrapper, Int]]", SerializableTests.serializable(Order[OptionT[ListWrapper, Int]])) PartialOrder[OptionT[ListWrapper, Int]] @@ -114,7 +108,7 @@ class OptionTTests extends CatsSuite { // F[Option[A]] has a monoid implicit val FA: Monoid[ListWrapper[Option[Int]]] = ListWrapper.monoid[Option[Int]] - checkAll("OptionT[ListWrapper, Int]", MonoidLawTests[OptionT[ListWrapper, Int]].monoid) + checkAll("OptionT[ListWrapper, Int]", MonoidTests[OptionT[ListWrapper, Int]].monoid) checkAll("Monoid[OptionT[ListWrapper, Int]]", SerializableTests.serializable(Monoid[OptionT[ListWrapper, Int]])) Semigroup[OptionT[ListWrapper, Int]] @@ -124,7 +118,7 @@ class OptionTTests extends CatsSuite { // F[Option[A]] has a semigroup implicit val FA: Semigroup[ListWrapper[Option[Int]]] = ListWrapper.semigroup[Option[Int]] - checkAll("OptionT[ListWrapper, Int]", SemigroupLawTests[OptionT[ListWrapper, Int]].semigroup) + checkAll("OptionT[ListWrapper, Int]", SemigroupTests[OptionT[ListWrapper, Int]].semigroup) checkAll("Semigroup[OptionT[ListWrapper, Int]]", SerializableTests.serializable(Semigroup[OptionT[ListWrapper, Int]])) } diff --git a/tests/src/test/scala/cats/tests/OrderTests.scala b/tests/src/test/scala/cats/tests/OrderSuite.scala similarity index 65% rename from tests/src/test/scala/cats/tests/OrderTests.scala rename to tests/src/test/scala/cats/tests/OrderSuite.scala index 450bb8b429..304cc5e59f 100644 --- a/tests/src/test/scala/cats/tests/OrderTests.scala +++ b/tests/src/test/scala/cats/tests/OrderSuite.scala @@ -2,21 +2,21 @@ package cats package tests -import cats.kernel.laws.discipline.{OrderTests => OrderLawTests} +import cats.kernel.laws.discipline.OrderTests -class OrderTests extends CatsSuite { +class OrderSuite extends CatsSuite { { Invariant[Order] Contravariant[Order] } - checkAll("Int", OrderLawTests[Int].order) - checkAll("Double", OrderLawTests[Double].order) - checkAll("Float", OrderLawTests[Float].order) - checkAll("Long", OrderLawTests[Long].order) + checkAll("Int", OrderTests[Int].order) + checkAll("Double", OrderTests[Double].order) + checkAll("Float", OrderTests[Float].order) + checkAll("Long", OrderTests[Long].order) } -object OrderTests { +object OrderSuite { def summonInstance(): Unit = { import cats.instances.order._ Invariant[Order] diff --git a/tests/src/test/scala/cats/tests/OrderingTests.scala b/tests/src/test/scala/cats/tests/OrderingSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/OrderingTests.scala rename to tests/src/test/scala/cats/tests/OrderingSuite.scala index f00d3d6434..2af60c5992 100644 --- a/tests/src/test/scala/cats/tests/OrderingTests.scala +++ b/tests/src/test/scala/cats/tests/OrderingSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline._ import cats.laws.discipline.eq._ -class OrderingTests extends CatsSuite { +class OrderingSuite extends CatsSuite { Invariant[Ordering] Contravariant[Ordering] diff --git a/tests/src/test/scala/cats/tests/PartialOrderTests.scala b/tests/src/test/scala/cats/tests/PartialOrderSuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/PartialOrderTests.scala rename to tests/src/test/scala/cats/tests/PartialOrderSuite.scala index bf8d42e49b..0990617f0b 100644 --- a/tests/src/test/scala/cats/tests/PartialOrderTests.scala +++ b/tests/src/test/scala/cats/tests/PartialOrderSuite.scala @@ -3,7 +3,7 @@ package tests -class PartialOrderTests extends CatsSuite { +class PartialOrderSuite extends CatsSuite { { Invariant[PartialOrder] Contravariant[PartialOrder] @@ -23,7 +23,7 @@ class PartialOrderTests extends CatsSuite { } } -object PartialOrderTests { +object PartialOrderSuite { def summonInstance(): Unit = { import cats.instances.partialOrder._ Invariant[PartialOrder] diff --git a/tests/src/test/scala/cats/tests/PartialOrderingTests.scala b/tests/src/test/scala/cats/tests/PartialOrderingSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/PartialOrderingTests.scala rename to tests/src/test/scala/cats/tests/PartialOrderingSuite.scala index f5d02643b1..81d3e37b2a 100644 --- a/tests/src/test/scala/cats/tests/PartialOrderingTests.scala +++ b/tests/src/test/scala/cats/tests/PartialOrderingSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline._ import cats.laws.discipline.eq._ -class PartialOrderingTests extends CatsSuite { +class PartialOrderingSuite extends CatsSuite { Invariant[PartialOrdering] Contravariant[PartialOrdering] diff --git a/tests/src/test/scala/cats/tests/QueueTests.scala b/tests/src/test/scala/cats/tests/QueueSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/QueueTests.scala rename to tests/src/test/scala/cats/tests/QueueSuite.scala index 4963db0435..621724855b 100644 --- a/tests/src/test/scala/cats/tests/QueueTests.scala +++ b/tests/src/test/scala/cats/tests/QueueSuite.scala @@ -5,7 +5,7 @@ import scala.collection.immutable.Queue import cats.laws.discipline.{CoflatMapTests, MonadTests, AlternativeTests, SerializableTests, TraverseTests, SemigroupalTests} -class QueueTests extends CatsSuite { +class QueueSuite extends CatsSuite { checkAll("Queue[Int]", SemigroupalTests[Queue].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Queue]", SerializableTests.serializable(Semigroupal[Queue])) diff --git a/tests/src/test/scala/cats/tests/ReducibleTests.scala b/tests/src/test/scala/cats/tests/ReducibleSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/ReducibleTests.scala rename to tests/src/test/scala/cats/tests/ReducibleSuite.scala index 74e4ee5148..a92fdd25b5 100644 --- a/tests/src/test/scala/cats/tests/ReducibleTests.scala +++ b/tests/src/test/scala/cats/tests/ReducibleSuite.scala @@ -5,7 +5,7 @@ import org.scalacheck.Arbitrary import cats.data.NonEmptyList -class ReducibleTestsAdditional extends CatsSuite { +class ReducibleSuiteAdditional extends CatsSuite { test("Reducible[NonEmptyList].reduceLeftM stack safety") { def nonzero(acc: Long, x: Long): Option[Long] = @@ -71,7 +71,7 @@ class ReducibleTestsAdditional extends CatsSuite { } -abstract class ReducibleCheck[F[_]: Reducible](name: String)(implicit ArbFInt: Arbitrary[F[Int]], ArbFString: Arbitrary[F[String]]) extends FoldableCheck[F](name) { +abstract class ReducibleSuite[F[_]: Reducible](name: String)(implicit ArbFInt: Arbitrary[F[Int]], ArbFString: Arbitrary[F[String]]) extends FoldableSuite[F](name) { def range(start: Long, endInclusive: Long): F[Long] test(s"Reducible[$name].reduceLeftM stack safety") { diff --git a/tests/src/test/scala/cats/tests/RegressionTests.scala b/tests/src/test/scala/cats/tests/RegressionSuite.scala similarity index 99% rename from tests/src/test/scala/cats/tests/RegressionTests.scala rename to tests/src/test/scala/cats/tests/RegressionSuite.scala index be197e087b..e62c5f9df3 100644 --- a/tests/src/test/scala/cats/tests/RegressionTests.scala +++ b/tests/src/test/scala/cats/tests/RegressionSuite.scala @@ -4,7 +4,7 @@ package tests import cats.data.{Const, NonEmptyList} import scala.collection.mutable -class RegressionTests extends CatsSuite { +class RegressionSuite extends CatsSuite { // toy state class // not stack safe, very minimal, not for actual use diff --git a/tests/src/test/scala/cats/tests/SemigroupTests.scala b/tests/src/test/scala/cats/tests/SemigroupSuite.scala similarity index 88% rename from tests/src/test/scala/cats/tests/SemigroupTests.scala rename to tests/src/test/scala/cats/tests/SemigroupSuite.scala index 763c6f5ddf..fc5771bcda 100644 --- a/tests/src/test/scala/cats/tests/SemigroupTests.scala +++ b/tests/src/test/scala/cats/tests/SemigroupSuite.scala @@ -5,7 +5,7 @@ import org.scalatest._ -class SemigroupTests extends FunSuite { +class SemigroupSuite extends FunSuite { { import cats.implicits._ Invariant[Semigroup] diff --git a/tests/src/test/scala/cats/tests/SetTests.scala b/tests/src/test/scala/cats/tests/SetSuite.scala similarity index 86% rename from tests/src/test/scala/cats/tests/SetTests.scala rename to tests/src/test/scala/cats/tests/SetSuite.scala index 2703f6ec5a..a01f7562b2 100644 --- a/tests/src/test/scala/cats/tests/SetTests.scala +++ b/tests/src/test/scala/cats/tests/SetSuite.scala @@ -2,9 +2,9 @@ package cats package tests import cats.laws.discipline.{FoldableTests, MonoidKTests, SerializableTests} -import cats.kernel.laws.discipline.{MonoidTests => MonoidLawTests} -class SetTests extends CatsSuite { - checkAll("Set[Int]", MonoidLawTests[Set[Int]].monoid) +import cats.kernel.laws.discipline.MonoidTests +class SetSuite extends CatsSuite { + checkAll("Set[Int]", MonoidTests[Set[Int]].monoid) checkAll("Set[Int]", MonoidKTests[Set].monoidK[Int]) checkAll("MonoidK[Set]", SerializableTests.serializable(MonoidK[Set])) diff --git a/tests/src/test/scala/cats/tests/ShowTests.scala b/tests/src/test/scala/cats/tests/ShowSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/ShowTests.scala rename to tests/src/test/scala/cats/tests/ShowSuite.scala index 3d437f0438..99d1997ba0 100644 --- a/tests/src/test/scala/cats/tests/ShowTests.scala +++ b/tests/src/test/scala/cats/tests/ShowSuite.scala @@ -6,7 +6,7 @@ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.{ContravariantTests, SerializableTests} import cats.laws.discipline.eq._ -class ShowTests extends CatsSuite { +class ShowSuite extends CatsSuite { checkAll("Contravariant[Show]", ContravariantTests[Show].contravariant[Int, Int, Int]) checkAll("Contravariant[Show]", SerializableTests.serializable(Contravariant[Show])) diff --git a/tests/src/test/scala/cats/tests/SplitTest.scala b/tests/src/test/scala/cats/tests/SplitSuite.scala similarity index 78% rename from tests/src/test/scala/cats/tests/SplitTest.scala rename to tests/src/test/scala/cats/tests/SplitSuite.scala index 3cc5af0d83..f68bfe723d 100644 --- a/tests/src/test/scala/cats/tests/SplitTest.scala +++ b/tests/src/test/scala/cats/tests/SplitSuite.scala @@ -1,7 +1,7 @@ package cats package tests -class SplitTest extends CatsSuite { +class SplitSuite extends CatsSuite { test("syntax") { val f = (((_: Int) + 1) split ((_: Int) / 2)) f((1, 2)) should be((2, 1)) diff --git a/tests/src/test/scala/cats/tests/StreamTests.scala b/tests/src/test/scala/cats/tests/StreamSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/StreamTests.scala rename to tests/src/test/scala/cats/tests/StreamSuite.scala index 971fde07c8..648f114f6e 100644 --- a/tests/src/test/scala/cats/tests/StreamTests.scala +++ b/tests/src/test/scala/cats/tests/StreamSuite.scala @@ -3,7 +3,7 @@ package tests import cats.laws.discipline.{CoflatMapTests, MonadTests, AlternativeTests, SerializableTests, TraverseTests, SemigroupalTests} -class StreamTests extends CatsSuite { +class StreamSuite extends CatsSuite { checkAll("Stream[Int]", SemigroupalTests[Stream].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Stream]", SerializableTests.serializable(Semigroupal[Stream])) diff --git a/tests/src/test/scala/cats/tests/SyntaxTests.scala b/tests/src/test/scala/cats/tests/SyntaxSuite.scala similarity index 99% rename from tests/src/test/scala/cats/tests/SyntaxTests.scala rename to tests/src/test/scala/cats/tests/SyntaxSuite.scala index 1bb81c456b..05c8d40fcf 100644 --- a/tests/src/test/scala/cats/tests/SyntaxTests.scala +++ b/tests/src/test/scala/cats/tests/SyntaxSuite.scala @@ -24,7 +24,7 @@ import cats.syntax.AllSyntax * * None of these tests should ever run, or do any runtime checks. */ -object SyntaxTests extends AllInstances with AllSyntax { +object SyntaxSuite extends AllInstances with AllSyntax { // pretend we have a value of type A def mock[A]: A = ??? diff --git a/tests/src/test/scala/cats/tests/TraverseTests.scala b/tests/src/test/scala/cats/tests/TraverseSuite.scala similarity index 78% rename from tests/src/test/scala/cats/tests/TraverseTests.scala rename to tests/src/test/scala/cats/tests/TraverseSuite.scala index de48c339a1..b912201a9b 100644 --- a/tests/src/test/scala/cats/tests/TraverseTests.scala +++ b/tests/src/test/scala/cats/tests/TraverseSuite.scala @@ -6,7 +6,7 @@ import org.scalacheck.Arbitrary import cats.instances.all._ -abstract class TraverseCheck[F[_]: Traverse](name: String)(implicit ArbFInt: Arbitrary[F[Int]]) extends CatsSuite with PropertyChecks { +abstract class TraverseSuite[F[_]: Traverse](name: String)(implicit ArbFInt: Arbitrary[F[Int]]) extends CatsSuite with PropertyChecks { test(s"Traverse[$name].zipWithIndex") { forAll { (fa: F[Int]) => @@ -30,10 +30,10 @@ abstract class TraverseCheck[F[_]: Traverse](name: String)(implicit ArbFInt: Arb } -object TraverseCheck { +object TraverseSuite { // forces testing of the underlying implementation (avoids overridden methods) abstract class Underlying[F[_]: Traverse](name: String)(implicit ArbFInt: Arbitrary[F[Int]]) - extends TraverseCheck(s"$name (underlying)")(proxyTraverse[F], ArbFInt) + extends TraverseSuite(s"$name (underlying)")(proxyTraverse[F], ArbFInt) // proxies a traverse instance so we can test default implementations // to achieve coverage using default datatype instances @@ -47,15 +47,15 @@ object TraverseCheck { } } -class TraverseListCheck extends TraverseCheck[List]("List") -class TraverseStreamCheck extends TraverseCheck[Stream]("Stream") -class TraverseVectorCheck extends TraverseCheck[Vector]("Vector") +class TraverseListSuite extends TraverseSuite[List]("List") +class TraverseStreamSuite extends TraverseSuite[Stream]("Stream") +class TraverseVectorSuite extends TraverseSuite[Vector]("Vector") -class TraverseListCheckUnderlying extends TraverseCheck.Underlying[List]("List") -class TraverseStreamCheckUnderlying extends TraverseCheck.Underlying[Stream]("Stream") -class TraverseVectorCheckUnderlying extends TraverseCheck.Underlying[Vector]("Vector") +class TraverseListSuiteUnderlying extends TraverseSuite.Underlying[List]("List") +class TraverseStreamSuiteUnderlying extends TraverseSuite.Underlying[Stream]("Stream") +class TraverseVectorSuiteUnderlying extends TraverseSuite.Underlying[Vector]("Vector") -class TraverseTestsAdditional extends CatsSuite { +class TraverseSuiteAdditional extends CatsSuite { def checkZipWithIndexedStackSafety[F[_]](fromRange: Range => F[Int])(implicit F: Traverse[F]): Unit = { F.zipWithIndex(fromRange(1 to 70000)) diff --git a/tests/src/test/scala/cats/tests/TryTests.scala b/tests/src/test/scala/cats/tests/TrySuite.scala similarity index 93% rename from tests/src/test/scala/cats/tests/TryTests.scala rename to tests/src/test/scala/cats/tests/TrySuite.scala index 38e7a3fe37..e07ae3eddf 100644 --- a/tests/src/test/scala/cats/tests/TryTests.scala +++ b/tests/src/test/scala/cats/tests/TrySuite.scala @@ -1,17 +1,14 @@ package cats package tests -import cats.kernel.laws.discipline.{ - SemigroupTests => SemigroupLawTests, - MonoidTests => MonoidLawTests -} +import cats.kernel.laws.discipline.{SemigroupTests, MonoidTests} import cats.laws.{ApplicativeLaws, CoflatMapLaws, FlatMapLaws, MonadLaws} import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import scala.util.{Success, Try} -class TryTests extends CatsSuite { +class TrySuite extends CatsSuite { implicit val eqThrow: Eq[Throwable] = Eq.allEqual checkAll("Try[Int]", SemigroupalTests[Try].semigroupal[Int, Int, Int]) @@ -32,11 +29,11 @@ class TryTests extends CatsSuite { { implicit val F = ListWrapper.semigroup[Int] - checkAll("Try[ListWrapper[Int]]", SemigroupLawTests[Try[ListWrapper[Int]]].semigroup) + checkAll("Try[ListWrapper[Int]]", SemigroupTests[Try[ListWrapper[Int]]].semigroup) checkAll("Semigroup[Try[ListWrapper[Int]]", SerializableTests.serializable(Semigroup[Try[ListWrapper[Int]]])) } - checkAll("Try[Int]", MonoidLawTests[Try[Int]].monoid) + checkAll("Try[Int]", MonoidTests[Try[Int]].monoid) checkAll("Monoid[Try[Int]]", SerializableTests.serializable(Monoid[Try[Int]])) test("show") { diff --git a/tests/src/test/scala/cats/tests/Tuple2KTests.scala b/tests/src/test/scala/cats/tests/Tuple2KSuite.scala similarity index 90% rename from tests/src/test/scala/cats/tests/Tuple2KTests.scala rename to tests/src/test/scala/cats/tests/Tuple2KSuite.scala index be19e385ba..6fefeb2ebd 100644 --- a/tests/src/test/scala/cats/tests/Tuple2KTests.scala +++ b/tests/src/test/scala/cats/tests/Tuple2KSuite.scala @@ -6,13 +6,9 @@ import cats.data.Tuple2K import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ -import cats.kernel.laws.discipline.{ - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{OrderTests, PartialOrderTests, EqTests} -class Tuple2KTests extends CatsSuite { +class Tuple2KSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Tuple2K[Option, List, ?]] checkAll("Tuple2K[Option, List, Int]", SemigroupalTests[λ[α => Tuple2K[Option, List, α]]].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Tuple2K[Option, List, Int]]", SerializableTests.serializable(Semigroupal[λ[α => Tuple2K[Option, List, α]]])) @@ -81,9 +77,9 @@ class Tuple2KTests extends CatsSuite { implicit val O = ListWrapper.order[Int] implicit val P = ListWrapper.partialOrder[Int] - checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", EqLawTests[Tuple2K[ListWrapper, ListWrapper, Int]].eqv) - checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", OrderLawTests[Tuple2K[ListWrapper, ListWrapper, Int]].order) - checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", PartialOrderLawTests[Tuple2K[ListWrapper, ListWrapper, Int]].partialOrder) + checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", EqTests[Tuple2K[ListWrapper, ListWrapper, Int]].eqv) + checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", OrderTests[Tuple2K[ListWrapper, ListWrapper, Int]].order) + checkAll("Tuple2K[ListWrapper, ListWrapper, Int]", PartialOrderTests[Tuple2K[ListWrapper, ListWrapper, Int]].partialOrder) } test("show") { diff --git a/tests/src/test/scala/cats/tests/TupleTests.scala b/tests/src/test/scala/cats/tests/TupleSuite.scala similarity index 98% rename from tests/src/test/scala/cats/tests/TupleTests.scala rename to tests/src/test/scala/cats/tests/TupleSuite.scala index edf5651323..ad3ebf95b6 100644 --- a/tests/src/test/scala/cats/tests/TupleTests.scala +++ b/tests/src/test/scala/cats/tests/TupleSuite.scala @@ -6,7 +6,7 @@ import data.NonEmptyList import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ -class TupleTests extends CatsSuite { +class TupleSuite extends CatsSuite { implicit val iso1 = SemigroupalTests.Isomorphisms.invariant[(NonEmptyList[Int], ?)] implicit val iso2 = SemigroupalTests.Isomorphisms.invariant[(String, ?)] diff --git a/tests/src/test/scala/cats/tests/ValidatedTests.scala b/tests/src/test/scala/cats/tests/ValidatedSuite.scala similarity index 92% rename from tests/src/test/scala/cats/tests/ValidatedTests.scala rename to tests/src/test/scala/cats/tests/ValidatedSuite.scala index 194fcb9b46..6a831cfadf 100644 --- a/tests/src/test/scala/cats/tests/ValidatedTests.scala +++ b/tests/src/test/scala/cats/tests/ValidatedSuite.scala @@ -7,17 +7,11 @@ import cats.laws.discipline._ import org.scalacheck.Arbitrary._ import cats.laws.discipline.SemigroupKTests import cats.laws.discipline.arbitrary._ -import cats.kernel.laws.discipline.{ - MonoidTests => MonoidLawTests, - SemigroupTests => SemigroupLawTests, - OrderTests => OrderLawTests, - PartialOrderTests => PartialOrderLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, OrderTests, PartialOrderTests, EqTests} import scala.util.Try -class ValidatedTests extends CatsSuite { +class ValidatedSuite extends CatsSuite { implicit val iso = SemigroupalTests.Isomorphisms.invariant[Validated[String, ?]] checkAll("Validated[String, Int]", SemigroupalTests[Validated[String,?]].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Validated[String,?]]", SerializableTests.serializable(Semigroupal[Validated[String,?]])) @@ -33,12 +27,12 @@ class ValidatedTests extends CatsSuite { checkAll("Validated[String, Int] with Option", TraverseTests[Validated[String,?]].traverse[Int, Int, Int, Int, Option, Option]) checkAll("Traverse[Validated[String, ?]]", SerializableTests.serializable(Traverse[Validated[String,?]])) - checkAll("Validated[String, Int]", OrderLawTests[Validated[String, Int]].order) + checkAll("Validated[String, Int]", OrderTests[Validated[String, Int]].order) checkAll("Order[Validated[String, Int]]", SerializableTests.serializable(Order[Validated[String, Int]])) - checkAll("Validated[String, Int]", MonoidLawTests[Validated[String, Int]].monoid) + checkAll("Validated[String, Int]", MonoidTests[Validated[String, Int]].monoid) - checkAll("Validated[String, NonEmptyList[Int]]", SemigroupLawTests[Validated[String, NonEmptyList[Int]]].semigroup) + checkAll("Validated[String, NonEmptyList[Int]]", SemigroupTests[Validated[String, NonEmptyList[Int]]].semigroup) { implicit val L = ListWrapper.semigroup[String] @@ -49,14 +43,14 @@ class ValidatedTests extends CatsSuite { { implicit val S = ListWrapper.partialOrder[String] implicit val I = ListWrapper.partialOrder[Int] - checkAll("Validated[ListWrapper[String], ListWrapper[Int]]", PartialOrderLawTests[Validated[ListWrapper[String], ListWrapper[Int]]].partialOrder) + checkAll("Validated[ListWrapper[String], ListWrapper[Int]]", PartialOrderTests[Validated[ListWrapper[String], ListWrapper[Int]]].partialOrder) checkAll("PartialOrder[Validated[ListWrapper[String], ListWrapper[Int]]]", SerializableTests.serializable(PartialOrder[Validated[ListWrapper[String], ListWrapper[Int]]])) } { implicit val S = ListWrapper.eqv[String] implicit val I = ListWrapper.eqv[Int] - checkAll("Validated[ListWrapper[String], ListWrapper[Int]]", EqLawTests[Validated[ListWrapper[String], ListWrapper[Int]]].eqv) + checkAll("Validated[ListWrapper[String], ListWrapper[Int]]", EqTests[Validated[ListWrapper[String], ListWrapper[Int]]].eqv) checkAll("Eq[Validated[ListWrapper[String], ListWrapper[Int]]]", SerializableTests.serializable(Eq[Validated[ListWrapper[String], ListWrapper[Int]]])) } diff --git a/tests/src/test/scala/cats/tests/VectorTests.scala b/tests/src/test/scala/cats/tests/VectorSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/VectorTests.scala rename to tests/src/test/scala/cats/tests/VectorSuite.scala index ff86fea92b..9c9137cfd5 100644 --- a/tests/src/test/scala/cats/tests/VectorTests.scala +++ b/tests/src/test/scala/cats/tests/VectorSuite.scala @@ -5,7 +5,7 @@ import cats.data.NonEmptyVector import cats.laws.discipline.{AlternativeTests, CoflatMapTests, SerializableTests, TraverseTests, SemigroupalTests} import cats.laws.discipline.arbitrary._ -class VectorTests extends CatsSuite { +class VectorSuite extends CatsSuite { checkAll("Vector[Int]", SemigroupalTests[Vector].semigroupal[Int, Int, Int]) checkAll("Semigroupal[Vector]", SerializableTests.serializable(Semigroupal[Vector])) diff --git a/tests/src/test/scala/cats/tests/WordCountTest.scala b/tests/src/test/scala/cats/tests/WordCountSuite.scala similarity index 97% rename from tests/src/test/scala/cats/tests/WordCountTest.scala rename to tests/src/test/scala/cats/tests/WordCountSuite.scala index 68831cc378..5acf01142e 100644 --- a/tests/src/test/scala/cats/tests/WordCountTest.scala +++ b/tests/src/test/scala/cats/tests/WordCountSuite.scala @@ -8,7 +8,7 @@ import Func.appFunc * This an example of applicative function composition. * See: [[https://www.cs.ox.ac.uk/jeremy.gibbons/publications/iterator.pdf The Essence of the Iterator Pattern]] */ -class WordCountTest extends CatsSuite { +class WordCountSuite extends CatsSuite { test("wordcount") { import cats.data.State.{ get, set } val text = "Faith, I must leave thee, love, and shortly too.\nMy operant powers their functions leave to do.\n".toList diff --git a/tests/src/test/scala/cats/tests/WriterTests.scala b/tests/src/test/scala/cats/tests/WriterSuite.scala similarity index 94% rename from tests/src/test/scala/cats/tests/WriterTests.scala rename to tests/src/test/scala/cats/tests/WriterSuite.scala index 80cd56aa05..c0850c084f 100644 --- a/tests/src/test/scala/cats/tests/WriterTests.scala +++ b/tests/src/test/scala/cats/tests/WriterSuite.scala @@ -3,7 +3,7 @@ package tests import cats.data.Writer -class WriterTests extends CatsSuite { +class WriterSuite extends CatsSuite { test("pure syntax creates a writer with an empty log"){ forAll { (result: String) => type Logged[A] = Writer[List[Int], A] diff --git a/tests/src/test/scala/cats/tests/WriterTTests.scala b/tests/src/test/scala/cats/tests/WriterTSuite.scala similarity index 96% rename from tests/src/test/scala/cats/tests/WriterTTests.scala rename to tests/src/test/scala/cats/tests/WriterTSuite.scala index 9e0d6ccbd8..6cbcbd5dc2 100644 --- a/tests/src/test/scala/cats/tests/WriterTTests.scala +++ b/tests/src/test/scala/cats/tests/WriterTSuite.scala @@ -7,13 +7,9 @@ import cats.laws.discipline._ import cats.laws.discipline.arbitrary._ import cats.laws.discipline.eq._ -import cats.kernel.laws.discipline.{ - MonoidTests => MonoidLawTests, - SemigroupTests => SemigroupLawTests, - EqTests => EqLawTests -} +import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests, EqTests} -class WriterTTests extends CatsSuite { +class WriterTSuite extends CatsSuite { type Logged[A] = Writer[ListWrapper[Int], A] // we have a lot of generated lists of lists in these tests. We have to tell @@ -22,7 +18,7 @@ class WriterTTests extends CatsSuite { implicit override val generatorDrivenConfig: PropertyCheckConfiguration = checkConfiguration.copy(sizeRange = 5) - checkAll("WriterT[List, Int, Int]", EqLawTests[WriterT[List, Int, Int]].eqv) + checkAll("WriterT[List, Int, Int]", EqTests[WriterT[List, Int, Int]].eqv) checkAll("Eq[WriterT[List, Int, Int]]", SerializableTests.serializable(Eq[WriterT[List, Int, Int]])) checkAll("WriterT[Show, Int, Int]", ContravariantTests[WriterT[Show, Int, ?]].contravariant[Int, Int, Int]) @@ -294,11 +290,11 @@ class WriterTTests extends CatsSuite { implicit val FLV: Monoid[ListWrapper[(Int, Int)]] = ListWrapper.monoid[(Int, Int)] Monoid[WriterT[ListWrapper, Int, Int]] - checkAll("WriterT[ListWrapper, Int, Int]", MonoidLawTests[WriterT[ListWrapper, Int, Int]].monoid) + checkAll("WriterT[ListWrapper, Int, Int]", MonoidTests[WriterT[ListWrapper, Int, Int]].monoid) checkAll("Monoid[WriterT[ListWrapper, Int, Int]]", SerializableTests.serializable(Monoid[WriterT[ListWrapper, Int, Int]])) Monoid[Writer[Int, Int]] - checkAll("Writer[Int, Int]", MonoidLawTests[Writer[Int, Int]].monoid) + checkAll("Writer[Int, Int]", MonoidTests[Writer[Int, Int]].monoid) } { @@ -306,11 +302,11 @@ class WriterTTests extends CatsSuite { implicit val FLV: Semigroup[ListWrapper[(Int, Int)]] = ListWrapper.semigroup[(Int, Int)] Semigroup[WriterT[ListWrapper, Int, Int]] - checkAll("WriterT[ListWrapper, Int, Int]", SemigroupLawTests[WriterT[ListWrapper, Int, Int]].semigroup) + checkAll("WriterT[ListWrapper, Int, Int]", SemigroupTests[WriterT[ListWrapper, Int, Int]].semigroup) checkAll("Semigroup[WriterT[ListWrapper, Int, Int]]", SerializableTests.serializable(Semigroup[WriterT[ListWrapper, Int, Int]])) Semigroup[Writer[Int, Int]] - checkAll("Writer[Int, Int]", SemigroupLawTests[Writer[Int, Int]].semigroup) + checkAll("Writer[Int, Int]", SemigroupTests[Writer[Int, Int]].semigroup) } {