chore: add slow test config

This commit is contained in:
Zixuan Chen 2022-08-12 19:06:13 +08:00
parent cb0701ebf0
commit 07cfc036b7
2 changed files with 21 additions and 3 deletions

View file

@ -233,7 +233,7 @@ impl Interaction {
}
}
#[cfg(not(no_prop_test))]
#[cfg(not(no_proptest))]
mod string_prop_test {
use super::*;
use proptest::prelude::*;
@ -272,4 +272,18 @@ mod string_prop_test {
}
}
}
#[cfg(slow_proptest)]
proptest! {
#[test]
fn test_tree_string_op_the_same_slow(
interactions in prop::collection::vec(gen_interaction(), 1..2000),
) {
let mut s = String::new();
let mut tree = RleTree::default();
for interaction in interactions {
interaction.test_assert(&mut s, &mut tree);
}
}
}
}

View file

@ -5,8 +5,12 @@ test *FLAGS:
RUST_BACKTRACE=full cargo nextest run {{FLAGS}}
# test without proptest
test-fast:
RUSTFLAGS='--cfg no_proptest' cargo nextest run
test-fast *FLAGS:
RUSTFLAGS='--cfg no_prop_test' cargo nextest run {{FLAGS}}
# test with slower proptest
test-slow *FLAGS:
RUSTFLAGS='--cfg slow_proptest' cargo nextest run {{FLAGS}}
check-unsafe:
env RUSTFLAGS="-Funsafe-code --cap-lints=warn" cargo check