mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
reduce test count for Ordering tests (#5741)
* reduce test count for Ordering tests CHANGELOG_BEGIN CHANGELOG_END * changed the wrong one in ValueSpec; preserves base order is redundant for primitives
This commit is contained in:
parent
b2fc953250
commit
00025a5337
@ -447,10 +447,10 @@ class OrderingSpec
|
||||
implicit val svalueOrd: Order[SValue] = Order fromScalaOrdering Ordering
|
||||
implicit val cidOrd: Order[Cid] = svalueOrd contramap SValue.SContractId
|
||||
val EmptyScope: Value.LookupVariantEnum = _ => None
|
||||
"match SValue Ordering" in forAll(genAddend, minSuccessful(100)) { va =>
|
||||
"match SValue Ordering" in forAll(genAddend, minSuccessful(20)) { va =>
|
||||
import va.{injarb, injshrink}
|
||||
implicit val valueOrd: Order[Value[Cid]] = Tag unsubst Value.orderInstance[Cid](EmptyScope)
|
||||
forAll(minSuccessful(20)) { (a: va.Inj[Cid], b: va.Inj[Cid]) =>
|
||||
forAll(minSuccessful(5)) { (a: va.Inj[Cid], b: va.Inj[Cid]) =>
|
||||
import va.injord
|
||||
val ta = va.inj(a)
|
||||
val tb = va.inj(b)
|
||||
|
@ -150,14 +150,10 @@ class ValueSpec
|
||||
val EmptyScope: Value.LookupVariantEnum = _ => None
|
||||
implicit val ord: Order[T] = Tag unsubst Value.orderInstance(EmptyScope)
|
||||
|
||||
"obeys order laws" in forAll(genAddend, minSuccessful(100)) { va =>
|
||||
"obeys order laws" in forAll(genAddend, minSuccessful(10)) { va =>
|
||||
implicit val arb: Arbitrary[T] = va.injarb[Cid] map (va.inj(_))
|
||||
checkLaws(SzP.order.laws[T])
|
||||
}
|
||||
|
||||
"preserves base order" in forAll(genAddend, minSuccessful(100)) { va =>
|
||||
checkOrderPreserved[Cid](va, EmptyScope)
|
||||
}
|
||||
}
|
||||
|
||||
"for record and variant types" - {
|
||||
|
Loading…
Reference in New Issue
Block a user