Expand description
This crate is a port of Haskell’s QuickCheck.
QuickCheck is a library for random testing of program properties. The programmer provides a specification of the program, in the form of properties which functions should satisfy, and QuickCheck then tests that the properties hold in a large number of randomly generated cases.
For detailed examples, please see the README.
§Compatibility
In general, this crate considers the Arbitrary implementations provided as
implementation details. Strategies may or may not change over time, which may
cause new test failures, presumably due to the discovery of new bugs due to a
new kind of witness being generated. These sorts of changes may happen in
semver compatible releases.
Macros§
- quickcheck
- A macro for writing quickcheck tests.
Structs§
- Gen
Genrepresents a PRNG.- NoShrink
- Wrapper for disabling shrinking for an Arbitrary
- Quick
Check - The main
QuickChecktype for setting configuration and runningQuickCheck. - Test
Result - Describes the status of a single instance of a test.
Traits§
- Arbitrary
Arbitrarydescribes types whose values can be randomly generated and shrunk.- Testable
Testabledescribes types (e.g., a function) whose values can be tested.
Functions§
- empty_
shrinker - Creates a shrinker with zero elements.
- quickcheck
- Convenience function for running
QuickCheck. - single_
shrinker - Creates a shrinker with a single element.