A Rust crate for property-based testing.
Add this to your Cargo.toml
:
toml
[dependencies]
prop-check-rs = "<<version>>"
rust
#[test]
fn test_choose_char() -> Result<(), Error> {
let g = Gens::one_of_vec(vec!['a', 'b', 'c', 'x', 'y', 'z']);
let prop = prop::for_all(g, move |a| {
info!("prop1:a = {}", a);
a == a
});
prop::test_with_prop(prop, 1, 100, RNG::new())
}
for example, https://github.com/j5ik2o/uri-rs/blob/main/src/parser/parsers/uri_parsers.rs
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.