proptest::option

Function of

source
pub fn of<T: Strategy>(t: T) -> OptionStrategy<T>
Expand description

Return a strategy producing Optional values wrapping values from the given delegate strategy.

Some values shrink to None.

Some and None are each chosen with 50% probability.