Skip to content

Instantly share code, notes, and snippets.

@zainab-ali
Created September 19, 2025 09:38
Show Gist options
  • Save zainab-ali/b09cd680b6c4504b0f905a6823e21f2b to your computer and use it in GitHub Desktop.
Save zainab-ali/b09cd680b6c4504b0f905a6823e21f2b to your computer and use it in GitHub Desktop.
//> using scala "3.7.3"
//> using test.dep org.typelevel::weaver-cats::0.10.1
//> using test.dep org.typelevel::weaver-scalacheck::0.10.1
import weaver.*
import weaver.scalacheck.*
import org.scalacheck.rng.Seed
object CheckersBug extends SimpleIOSuite with Checkers {
override def checkConfig = super.checkConfig.withInitialSeed(Seed.fromBase64(
"kmjywzhL9YdGa0qwuJep51gCv0bSjr4p04st85cXOKG=").toOption)
test("Without fail fast") { _ => forall { (i: Int) => expect.eql(5, i) } }
test("With fail fast") { _ =>
forall { (i: Int) => expect.eql(5, i).failFast.as(success) }
}
}
@zainab-ali
Copy link
Author

Report

- Without fail fast 33ms
 [0] Property test failed on try 1 with seed Seed.fromBase64("kmjywzhL9YdGa0qwuJep51gCv0bSjr4p04st85cXOKG=") and input -1962449268. (modules/scalacheck/shared/src/main/scala/weaver/scalacheck/Checkers.scala:171)
 [0] You can reproduce this by adding the following override to your suite:
 [0]
 [0] override def checkConfig = super.checkConfig.withInitialSeed(Seed.fromBase64("kmjywzhL9YdGa0qwuJep51gCv0bSjr4p04st85cXOKG=").toOption)
 [0]
 [0] modules/scalacheck/shared/src/main/scala/weaver/scalacheck/Checkers.scala:171
 [0]                 |override def checkConfig = super.checkConfig.withInitialSeed($seed.toOption)""".stripMargin)
 [0]                                                                                                             ^

 [1] Values not equal: (../../../../../../var/folders/5b/y1f7b3k55qjg92rhq_rl7hfw0000gn/T/9106983040392337259/.scala-build/9106983040392337259_6131f6eb86-e523ace0ec/src_generated/test/CheckersBug.test.scala:14)
 [1]
 [1] => Diff (- obtained, + expected)
 [1] --1962449268
 [1] +5
 [1]
 [1] ../../../../../../var/folders/5b/y1f7b3k55qjg92rhq_rl7hfw0000gn/T/9106983040392337259/.scala-build/9106983040392337259_6131f6eb86-e523ace0ec/src_generated/test/CheckersBug.test.scala:14
 [1]   test("Without fail fast") { _ => forall { (i: Int) => expect.eql(5, i) } }
 [1]                                                                        ^
- With fail fast 33ms
  Values not equal: (../../../../../../var/folders/5b/y1f7b3k55qjg92rhq_rl7hfw0000gn/T/9106983040392337259/.scala-build/9106983040392337259_6131f6eb86-e523ace0ec/src_generated/test/CheckersBug.test.scala:17)

  => Diff (- obtained, + expected)
  --1962449268
  +5

  ../../../../../../var/folders/5b/y1f7b3k55qjg92rhq_rl7hfw0000gn/T/9106983040392337259/.scala-build/9106983040392337259_6131f6eb86-e523ace0ec/src_generated/test/CheckersBug.test.scala:17
      forall { (i: Int) => expect.eql(5, i).failFast.as(success) }
                                          ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment