Skip to content

Commit

Permalink
Fix scalacheck dependency error
Browse files Browse the repository at this point in the history
  • Loading branch information
durban authored and erik-stripe committed Sep 6, 2016
1 parent 4dcafc1 commit 80a63f9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ lazy val commonJsSettings = Seq(
botBuild := scala.sys.env.get("TRAVIS").isDefined,
// batch mode decreases the amount of memory needed to compile scala.js code
scalaJSOptimizerOptions := scalaJSOptimizerOptions.value.withBatchMode(botBuild.value),
doctestGenTests := Seq.empty
doctestGenTests := Seq.empty,
doctestWithDependencies := false
)

lazy val commonJvmSettings = Seq(
Expand Down
4 changes: 2 additions & 2 deletions free/src/test/scala/cats/free/FreeTTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import cats.laws.discipline._
import cats.tests.CatsSuite
import cats.instances.option._

import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.{Arbitrary, Gen, Cogen}

class FreeTTests extends CatsSuite {

Expand Down Expand Up @@ -165,7 +165,7 @@ object FreeTTests extends FreeTTestsInstances {
def withFlatMapped = for {
fDepth <- nextDepth
freeDepth <- nextDepth
f <- arbFunction1[A, FreeT[F, G, A]](Arbitrary(freeTGen[F, G, A](fDepth))).arbitrary
f <- arbFunction1[A, FreeT[F, G, A]](Arbitrary(freeTGen[F, G, A](fDepth)), Cogen[Unit].contramap(_ => ())).arbitrary
freeFGA <- freeTGen[F, G, A](freeDepth)
} yield freeFGA.flatMap(f)

Expand Down
4 changes: 2 additions & 2 deletions free/src/test/scala/cats/free/FreeTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import cats.arrow.FunctionK
import cats.laws.discipline.{CartesianTests, MonadTests, SerializableTests}
import cats.laws.discipline.arbitrary.catsLawsArbitraryForFn0

import org.scalacheck.{Arbitrary, Gen}
import org.scalacheck.{Arbitrary, Gen, Cogen}
import Arbitrary.arbFunction1

class FreeTests extends CatsSuite {
Expand Down Expand Up @@ -131,7 +131,7 @@ sealed trait FreeTestsInstances {
def withFlatMapped = for {
fDepth <- nextDepth
freeDepth <- nextDepth
f <- arbFunction1[A, Free[F, A]](Arbitrary(freeGen[F, A](fDepth))).arbitrary
f <- arbFunction1[A, Free[F, A]](Arbitrary(freeGen[F, A](fDepth)), Cogen[Unit].contramap(_ => ())).arbitrary
freeFA <- freeGen[F, A](freeDepth)
} yield freeFA.flatMap(f)

Expand Down
4 changes: 2 additions & 2 deletions js/src/test/scala/cats/tests/FutureTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ class FutureTests extends CatsSuite {
// ScalaCheck? is something else happening? who knows?
//
// for now we'll let sleeping dogs lie.
implicit def fakeArbitraryFunction[A: Cogen, B: Arbitrary]: Arbitrary[A => B] =
Arbitrary(arbitrary[B].map(b => (a: A) => b))
//implicit def fakeArbitraryFunction[A: Cogen, B: Arbitrary]: Arbitrary[A => B] =
// Arbitrary(arbitrary[B].map(b => (a: A) => b))

checkAll("Future[Int]", MonadErrorTests[Future, Throwable].monadError[Int, Int, Int])
checkAll("Future[Int]", ComonadTests[Future].comonad[Int, Int, Int])
Expand Down

0 comments on commit 80a63f9

Please sign in to comment.