pub use bolero_generator::any::*;
#[cfg(not(kani))]
pub fn run<D, F, R>(driver: Box<D>, test: F) -> (Box<D>, Result<bool, crate::panic::PanicError>)
where
D: 'static + bolero_generator::driver::object::DynDriver + core::any::Any + Sized,
F: FnMut() -> R + core::panic::RefUnwindSafe,
R: super::IntoResult,
{
let mut test = core::panic::AssertUnwindSafe(test);
scope::with(driver, || {
crate::panic::catch(|| test.0().into_result().map(|_| true))
})
}
#[cfg(kani)]
pub fn run<F, R>(
driver: bolero_generator::kani::Driver,
mut test: F,
) -> (
bolero_generator::kani::Driver,
Result<bool, crate::panic::PanicError>,
)
where
F: FnMut() -> R,
R: super::IntoResult,
{
scope::with(driver, || test().into_result().map(|_| true))
}