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
Add a function to Equivalence for convenient conversion to a TestResult
`quickcheck` allows to skip tests (for given inputs) by returning a
`TestResult` indicating that it should be ignored. Naturally, an
`Equivalence` cannot express such an intent and neither can any other
`Testable`s other than functions and `TestResult` itself. Hence, if we
need the ability to skip tests, we need to return a `TestResult` or some
dependent type (e.g. `Result<TestResult>`) from our property function.
If we still want to make use of `Equivalence` in such tests, we need to
convert it to a `TestResult`. Previously, we had to resort to using
`Testable::result` with some dummy `&mut Gen`, even though it isn't even
used in the conversion. As a remedy, this change moves the conversion
into a dedicates function (with no additional parameters) which may be
called inside property functions.
0 commit comments