arbtest

Crates.ioarbtest
lib.rsarbtest
version0.3.1
sourcesrc
created_at2022-04-10 21:23:22.62124
updated_at2024-02-22 09:40:42.75974
descriptionA minimalist property-based testing library based on arbitrary
homepage
repositoryhttps://github.com/matklad/arbtest
max_upload_size
id565235
size36,054
Serhii Potapov (greyblake)

documentation

README

arbtest

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(())
    });
}
Commit count: 6

cargo fmt