pub trait Fuzzable {
fn random_input() -> Self;
}
pub fn fuzz<F, InputType, OutputType>(f: F)
where
F: Fn(InputType) -> OutputType,
InputType: Fuzzable,
{
loop {
let t = InputType::random_input();
f(t);
}
}
impl Fuzzable for bool {
fn random_input() -> bool {
false
}
}