Crates.io | prop-check-rs |
lib.rs | prop-check-rs |
version | 0.0.634 |
source | src |
created_at | 2021-08-19 15:00:46.911698 |
updated_at | 2024-07-16 00:18:40.028049 |
description | A Property-based testing Library in Rust |
homepage | |
repository | https://github.com/j5ik2o/prop-check-rs |
max_upload_size | |
id | 439649 |
size | 86,804 |
A Rust crate for property-based testing.
Add this to your Cargo.toml
:
[dependencies]
prop-check-rs = "<<version>>"
#[test]
fn test_one_of() -> Result<()> {
let gen = Gens::one_of_values(['a', 'b', 'c', 'x', 'y', 'z']);
let prop = for_all_gen(gen, move |value| {
log::info!("value = {}", value);
true
});
test_with_prop(prop, 1, 100, new_rng())
}
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.