pub fn fuzz_test<T, F, TestFunctionKind>(
test_function: F
) -> FuzzerBuilder1<T::Owned, F::NormalizedFunction> where
T: ?Sized + ToOwned + 'static,
T::Owned: Clone,
F: FuzzTestFunction<T::Owned, T, TestFunctionKind>,
Expand description
Build a fuzz test for the given function!
The returned value is a FuzzerBuilder1
. See the module/crate documentation
for a full example of how to build a fuzz test.
There are currently three kinds of functions that can be passed as arguments:
Fn(&T)
: the fuzzer will only report a failure when the given function crashesFn(&T) -> Bool
: the fuzzer will report a failure when the output isfalse
Fn(&T) -> Result<_,_>
: the fuzzer will report a failure when the output isErr(..)