Skip to content

Commit

Permalink
Merge pull request #342 from TimWSpence/bug-fix
Browse files Browse the repository at this point in the history
Custom Arbitrary[Int] to make collisions extremely unlikely
  • Loading branch information
mpilquist authored May 23, 2024
2 parents 291d0b2 + f9d40d3 commit 2daf6ba
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package munit
import cats.effect.IO
import cats.effect.unsafe.implicits.global
import org.scalacheck.effect.PropF
import org.scalacheck.Shrink
import org.scalacheck.{Arbitrary, Gen, Shrink}

// Who tests the tests?
class ScalaCheckEffectSuiteSuite extends ScalaCheckEffectSuite {
Expand All @@ -34,6 +34,10 @@ class ScalaCheckEffectSuiteSuite extends ScalaCheckEffectSuite {
new ValueTransform("IO", { case e: IO[_] => e.unsafeToFuture() })

test("Correctly slides seed for multi-arg PropF") {
implicit val arbForInt: Arbitrary[Int] = Arbitrary(
Gen.choose(0, Int.MaxValue)
)

var last: Option[Int] = None
var duplicates = 0

Expand Down

0 comments on commit 2daf6ba

Please sign in to comment.