prop-check-rs

A Rust crate for property-based testing.

Workflow Status crates.io docs.rs dependency status tokei

Install to Cargo.toml

Add this to your Cargo.toml:

toml [dependencies] prop-check-rs = "<<version>>"

Usage

rust #[test] fn test_choose_char() -> Result<(), Error> { let g = Gens::one_of(['a', 'b', 'c', 'x', 'y', 'z']); let prop = prop::for_all(g, move |a| { info!("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

License

Licensed under either of

at your option.

Contribution

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.