quickcheck
quickcheck copied to clipboard
Automated property based testing for Rust (with shrinking).
This does very small changes to remove some warnings Clippy complains about.
Hi @BurntSushi, thank you for this very nice library! This PR adds an implementation of `From` for `TestResult`. It allows using `TestResult::from(true)` everywhere, and `true.into()` when the `TestResult` type can...
Like a few other macros, `panic!` accepts a format string and arguments. The format string is meant to be static and calling it with a message string will generate a...
Uses [`std::array::from_fn`](https://doc.rust-lang.org/stable/std/array/fn.from_fn.html), which was introduced in [Rust 1.63.0](https://blog.rust-lang.org/2022/08/11/Rust-1.63.0.html#stabilized-apis), ~1 year ago
Following the [zero2production book](https://github.com/LukeMathWalker/zero-to-production) With `quickcheck = "0.9.2"`, `quickcheck_macros = "0.9.1"` and `fake = "~2.3"`, the following works, because the function `Arbitrary::arbitrary` expected a `Gen` trait, and `Gen` used to...
Fixes #272 The `i128` and `u128` experimental types are not well supported by emscripten, and `rand` doesn't support them when targeting emscripten. This PR excludes supports for `i128` and `u128`...
Arbitrary `SystemTime`s are generated based on arbitrary `Duration`s by adding or subtracting from `UNIX_EPOCH`. If we happen to generate big `Duration`s, this could cause an overflow. This change avoids this...
According to `Gen::new` doc: > The size parameter controls the size of random values generated. For example, it specifies the maximum length of a randomly generated vector, but is and...
We try to shrink values recursively, i.e. when a shrunk value witnesses a failure, we'd shrink that value further. Previously, this recursion would be implemented via actual control flow recursion,...
It turns out that the tests inside byteorder were designed around the ability to control the bounds of integers generated and there is no easy way to adapt them to...