Registry / testing / quickcheck

quickcheck

JSON →
library1.1.0rscratesunverified

Automatic property-based testing with shrinking for Rust.

# Cargo.toml [dependencies] quickcheck = "1.1.0"
INSTALL
IMPORT
SIG · QUICKCHECK
Q
quickcheck
testingrustv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QuickCheck
use quickcheck::QuickCheck;

Tests that reversing a vector twice yields the original vector.

use quickcheck::QuickCheck; fn reverse_twice_is_identity(xs: Vec<i32>) -> bool { let rev: Vec<i32> = xs.iter().rev().cloned().collect(); let rev_rev: Vec<i32> = rev.iter().rev().cloned().collect(); xs == rev_rev } fn main() { QuickCheck::new().quickcheck(reverse_twice_is_identity as fn(Vec<i32>) -> bool); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
quickcheck — cargo add quickcheck · libregistry