test(tvix/eval): Make proptests a bit smaller

Generate smaller recursive values for generated Values, and run fewer
cases for the attrs proptests which are particularly egregious.

Change-Id: Ia35c7c120270feaf045be1deb440c87ebb185c27
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6716
Autosubmit: grfn <grfn@gws.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
This commit is contained in:
Griffin Smith 2022-09-20 17:21:58 -04:00 committed by clbot
parent 876c477256
commit f600aa5322
2 changed files with 4 additions and 4 deletions

View file

@ -63,7 +63,7 @@ fn leaf_value() -> impl Strategy<Value = Value> {
}
fn non_internal_value() -> impl Strategy<Value = Value> {
leaf_value().prop_recursive(10, 256, 10, |inner| {
leaf_value().prop_recursive(3, 5, 5, |inner| {
prop_oneof![
any_with::<NixAttrs>((
Default::default(),

View file

@ -7,7 +7,7 @@ mod nix_eq {
use proptest::prelude::ProptestConfig;
use test_strategy::proptest;
#[proptest(ProptestConfig { cases: 5, ..Default::default() })]
#[proptest(ProptestConfig { cases: 2, ..Default::default() })]
fn reflexive(x: NixAttrs) {
let mut observer = NoOpObserver {};
let mut vm = VM::new(&mut observer);
@ -15,7 +15,7 @@ mod nix_eq {
assert!(x.nix_eq(&x, &mut vm).unwrap())
}
#[proptest(ProptestConfig { cases: 5, ..Default::default() })]
#[proptest(ProptestConfig { cases: 2, ..Default::default() })]
fn symmetric(x: NixAttrs, y: NixAttrs) {
let mut observer = NoOpObserver {};
let mut vm = VM::new(&mut observer);
@ -26,7 +26,7 @@ mod nix_eq {
)
}
#[proptest(ProptestConfig { cases: 5, ..Default::default() })]
#[proptest(ProptestConfig { cases: 2, ..Default::default() })]
fn transitive(x: NixAttrs, y: NixAttrs, z: NixAttrs) {
let mut observer = NoOpObserver {};
let mut vm = VM::new(&mut observer);