You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, it was awkward to use GoogleTest Rust assertions in Proptest property tests and to return GoogleTest `Result` from such tests. This required a fair amount of manual type conversion.
This adds two trait implementations behind an optional dependency on the `proptest` crate:
* An implementation of 'IntoTestResult` allows easily converting the output of `TestRunner` into a GoogleTest `Result`.
* An implementation of `From<TestAssertionFailure>` for `TestCaseError` allows easily using GoogleTest macros such as `verify_that!` inside `TestRunner::run`.
In particular, with this change, it is much easier to have property-based tests using `proptest` which do not panic on failure but rather communicate failures using `Result`, as is idiomatic in GoogleTest.
Since proptest requires Rust 1.60, this also modifies the CI action so that the test against Rust 1.59 only runs with the --no-default-features flag.
This also adds a section on integrations to the crate-level documentation covering both the new proptest integration and the existing [anyhow](https://crates.io/crates/anyhow) integration.
0 commit comments