proptest::prelude

Macro prop_assume

source
macro_rules! prop_assume {
    ($expr:expr) => { ... };
    ($expr:expr, $fmt:tt $(, $fmt_arg:expr),* $(,)?) => { ... };
}
Expand description

Rejects the test input if assumptions are not met.

Used directly within a function defined with proptest! or in any function returning Result<_, TestCaseError>.

This is invoked as prop_assume!(condition, format, args...). condition is evaluated; if it is false, Err(TestCaseError::Reject) is returned. The message includes the point of invocation and the format message. format and args may be omitted to simply use the condition itself as the message.