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:
Stephen Compall 2020-04-27 14:31:37 -04:00 committed by GitHub
parent b2fc953250
commit 00025a5337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -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)

View File

@ -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" - {