prop-check-rs 0.0.6

A Property-based testing Library in Rust
Documentation

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:

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

Usage

  #[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

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.