| Crates.io | arbtest |
| lib.rs | arbtest |
| version | 0.3.2 |
| created_at | 2022-04-10 21:23:22.62124+00 |
| updated_at | 2024-12-18 17:17:21.284354+00 |
| description | A minimalist property-based testing library based on arbitrary |
| homepage | |
| repository | https://github.com/matklad/arbtest |
| max_upload_size | |
| id | 565235 |
| size | 36,628 |
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(())
});
}