Crates.io | arbtest |
lib.rs | arbtest |
version | 0.3.1 |
source | src |
created_at | 2022-04-10 21:23:22.62124 |
updated_at | 2024-02-22 09:40:42.75974 |
description | A minimalist property-based testing library based on arbitrary |
homepage | |
repository | https://github.com/matklad/arbtest |
max_upload_size | |
id | 565235 |
size | 36,054 |
A powerful property-based testing library with a tiny API and a small implementation.
use arbtest::arbtest;
#[test]
fn all_numbers_are_even() {
arbtest(|u| {
let number: u32 = u.arbitrary()?;
assert!(number % 2 == 0);
Ok(())
});
}