prop-check-rs

A Rust crate for property-based testing.

Workflow Status crates.io docs.rs tokei

Install to Cargo.toml

Add this to your Cargo.toml:

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

Usage

Choose one value from a list

```rust

[test]

fn testoneof() -> Result<()> { let gen = Gens::oneofvalues(['a', 'b', 'c', 'x', 'y', 'z']); let prop = forallgen(gen, move |value| { log::info!("value = {}", value); true }); testwithprop(prop, 1, 100, new_rng()) } ```

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.