Skip to main content

Crate pbt

Crate pbt 

Source
Expand description

High-throughput property-based testing with derive, swarm-testing, precise sizing, and full graph-theoretic type analysis over mutually inductive and uninstantiable types.

Modules§

fields
Logic for generating and/or storing fields to be used on a given constructor.
hash
Standardized hash collections.
multiset
A multiset/bag: an unordered collection tracking the total count for potential duplicates of each element.
panic
Catch panics without letting their intermediate diagnostics reach stderr.
persist
Filesystem persistence for minimized witnesses.
reflection
Graph-theoretic analysis of the structure of algebraic data types.
registration
Opaque internal data necessary to register a type with the global type reflection graph.

Structs§

WyRand
A Pseudorandom Number generator, powered by the wyrand algorithm. This generator is based on the final v4.2 reference implementation.

Constants§

DEFAULT_N_CASES
The default number of cases to check if no alternate is specified.

Traits§

Pbt
The main property-based testing trait.

Functions§

check_eta_expansion
Check that deconstructing and then immediately reconstructing a value is a no-op.
check_serialization
Check that serializing and then immediately deserializing a value is a no-op.
getrandom
Get a(n expensive) random u64 from the OS via the getrandom crate.
witness
Search for the smallest witness of an arbitrary property, if one exists.
witness_without_persistence
Search for and shrink a witness without replaying or persisting witnesses.

Attribute Macros§

pbt
Turn a function into a test by throwing inputs at it until it panics.

Derive Macros§

Pbt
Derive ::pbt::Pbt for an arbitrary type.