You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got hit by this on #3747 (as certain as I can be that it's unrelated)
failing seed for order.antisymmetry eq is Ue31ofRHQVK9wcbnhBqISNebQdvZZhUREH6EgJBgjHB=
==> X cats.kernel.laws.Tests.Order[Duration]: order.antisymmetry eq 0.041s munit.FailException: /home/runner/work/cats/cats/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala:200
199: checkAll("Order[BigInt]", OrderTests[BigInt].order)
200: checkAll("Order[Duration]", OrderTests[Duration].order)
201: checkAll("Order[FiniteDuration]", OrderTests[FiniteDuration].order)
Failing seed: hzeHOUHfb3_7x_2BxKaJnuLQt8g8rW9F_NIqhIjY5eA=
You can reproduce this failure by adding the following override to your suite:
override val scalaCheckInitialSeed = "hzeHOUHfb3_7x_2BxKaJnuLQt8g8rW9F_NIqhIjY5eA="
Falsified after 93 passed tests.
Labels of failing property:
Expected: true
Received: false
ARG_0: 1224 hours
ARG_1: 51 days
ARG_2: org.scalacheck.GenArities$$Lambda$495/0x0000000800dcd108@aaedf00
at munit.Assertions.fail(Assertions.scala:261)
at munit.Assertions.fail$(Assertions.scala:255)
at munit.FunSuite.fail(FunSuite.scala:11)
at munit.ScalaCheckSuite.$anonfun$propToTry$4(ScalaCheckSuite.scala:104)
at scala.util.Try$.apply(Try.scala:213)
at munit.ScalaCheckSuite.propToTry(ScalaCheckSuite.scala:104)
at munit.ScalaCheckSuite.$anonfun$scalaCheckPropTransform$3(ScalaCheckSuite.scala:46)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
at munit.Suite$$anon$1.execute(Suite.scala:26)
at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:72)
at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete(Promise.scala:372)
at scala.concurrent.impl.Promise$KeptPromise$Kept.onComplete$(Promise.scala:371)
at scala.concurrent.impl.Promise$KeptPromise$Successful.onComplete(Promise.scala:379)
at scala.concurrent.impl.Promise.transform(Promise.scala:33)
at scala.concurrent.impl.Promise.transform$(Promise.scala:31)
at scala.concurrent.impl.Promise$KeptPromise$Successful.transform(Promise.scala:379)
at munit.internal.FutureCompat$ExtensionFuture.transformCompat(FutureCompat.scala:16)
at munit.ScalaCheckSuite.$anonfun$scalaCheckPropTransform$2(ScalaCheckSuite.scala:48)
at munit.GenericTest.$anonfun$withBodyMap$1(GenericTest.scala:33)
at munit.MUnitRunner.$anonfun$runTestBody$1(MUnitRunner.scala:296)
The text was updated successfully, but these errors were encountered:
Actually I see this has been discussed previously in #3353.
I'm a bit confused by the law actually - it seems to me that it need not hold in general
typeCogen[A] = (A, Seed) =>Seed//essentiallydefantiSymmetryEq(x: A, y: A, f: A=>A):IsEq[Boolean] =
(!E.eqv(x, y) ||E.eqv(f(x), f(y))) <->true
This law relies upon the function f being well-defined (x == y => f x == f y), where equality is determined by Eq. But of course in Scala we can easily write ill-defined functions eg when pattern matching. And in fact the functions generated by the Cogen instance are exactly that - they will take too equivalent FiniteDurations (eg 51 days and 1224 hours) and generate different values. The alternative Cogen implementation in Scalacheck looks like the only correct definition to me
I got hit by this on #3747 (as certain as I can be that it's unrelated)
failing seed for order.antisymmetry eq is Ue31ofRHQVK9wcbnhBqISNebQdvZZhUREH6EgJBgjHB=
==> X cats.kernel.laws.Tests.Order[Duration]: order.antisymmetry eq 0.041s munit.FailException: /home/runner/work/cats/cats/kernel-laws/shared/src/test/scala/cats/kernel/laws/LawTests.scala:200
199: checkAll("Order[BigInt]", OrderTests[BigInt].order)
200: checkAll("Order[Duration]", OrderTests[Duration].order)
201: checkAll("Order[FiniteDuration]", OrderTests[FiniteDuration].order)
Failing seed: hzeHOUHfb3_7x_2BxKaJnuLQt8g8rW9F_NIqhIjY5eA=
You can reproduce this failure by adding the following override to your suite:
override val scalaCheckInitialSeed = "hzeHOUHfb3_7x_2BxKaJnuLQt8g8rW9F_NIqhIjY5eA="
Falsified after 93 passed tests.
The text was updated successfully, but these errors were encountered: