1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! `test-better-property`: property-testing bridge.
//!
//! A property test states a fact that should hold for *every* input ("parsing
//! then serializing round-trips"), and the runner tries to break it with
//! generated inputs, shrinking any counterexample to its simplest form.
//!
//! This crate is the bridge between `test-better`'s `check!` idiom and a
//! property-testing backend. It has two pieces:
//!
//! - the [`Strategy`] seam (with [`ValueTree`], [`Runner`], [`GenError`]): a
//! deliberately small trait the runner is written against. The shipped
//! backend is `proptest`, which satisfies it through a blanket impl, so a
//! property test names ordinary `proptest` strategies;
//! - the runner: [`for_all`] (and [`for_all_with`]) generate cases, run a
//! `T -> TestResult` predicate, and on failure return a [`PropertyFailure`]
//! carrying the shrunk counterexample.
//!
//! Behind the off-by-default `quickcheck` feature, [`arbitrary`] bridges a
//! `quickcheck::Arbitrary` type into the same seam: a best-effort second
//! backend that proves [`Strategy`] is a real seam. It is
//! honest about its reduced fidelity; see the [`quickcheck_bridge`] module docs.
//!
//! The [`property!`] macro is the test-facing front for all of this: it takes
//! a closure, infers a [`Strategy`] from the binding's type (or takes one with
//! a `using` clause), and runs it through [`for_all`]. Rich shrunk-failure
//! rendering builds on the same surface.
pub use ;
pub use ;
pub use ;
pub use ;