[−][src]Trait bolero_engine::Test
Trait for defining a test case
Associated Types
type Value
The input value for the test case
Required methods
fn test<T: TestInput<Result<bool, PanicError>>>(
&mut self,
input: &mut T
) -> Result<bool, PanicError>
&mut self,
input: &mut T
) -> Result<bool, PanicError>
Execute one test with the given input
fn generate_value<T: TestInput<Self::Value>>(
&self,
input: &mut T
) -> Self::Value
&self,
input: &mut T
) -> Self::Value
Generate a value for the given input.
Note: this is used for printing the value related to a test failure
Provided methods
fn shrink(
&mut self,
input: Vec<u8>,
seed: Option<u64>,
driver_mode: Option<DriverMode>
) -> Option<TestFailure<Self::Value>>
&mut self,
input: Vec<u8>,
seed: Option<u64>,
driver_mode: Option<DriverMode>
) -> Option<TestFailure<Self::Value>>
Shrink the input to a simpler form
Implementors
impl<F: RefUnwindSafe + FnMut(&G::Output) -> Ret, G: RefUnwindSafe + ValueGenerator, Ret> Test for BorrowedGeneratorTest<F, G, G::Output> where
Ret: IntoTestResult,
G::Output: RefUnwindSafe + Debug,
[src]
Ret: IntoTestResult,
G::Output: RefUnwindSafe + Debug,
type Value = G::Output
fn test<T: TestInput<Result<bool, PanicError>>>(
&mut self,
input: &mut T
) -> Result<bool, PanicError>
[src]
&mut self,
input: &mut T
) -> Result<bool, PanicError>
fn generate_value<T: TestInput<Self::Value>>(
&self,
input: &mut T
) -> Self::Value
[src]
&self,
input: &mut T
) -> Self::Value
impl<F: RefUnwindSafe + FnMut(&[u8]) -> Ret, Ret> Test for F where
Ret: IntoTestResult,
[src]
Ret: IntoTestResult,
type Value = SliceDebug<Vec<u8>>
fn test<T: TestInput<Result<bool, PanicError>>>(
&mut self,
input: &mut T
) -> Result<bool, PanicError>
[src]
&mut self,
input: &mut T
) -> Result<bool, PanicError>
fn generate_value<T: TestInput<Self::Value>>(
&self,
input: &mut T
) -> Self::Value
[src]
&self,
input: &mut T
) -> Self::Value
impl<F: RefUnwindSafe + FnMut(&[u8]) -> Ret, Ret> Test for BorrowedSliceTest<F> where
Ret: IntoTestResult,
[src]
Ret: IntoTestResult,
type Value = SliceDebug<Vec<u8>>
fn test<T: TestInput<Result<bool, PanicError>>>(
&mut self,
input: &mut T
) -> Result<bool, PanicError>
[src]
&mut self,
input: &mut T
) -> Result<bool, PanicError>
fn generate_value<T: TestInput<Self::Value>>(
&self,
input: &mut T
) -> Self::Value
[src]
&self,
input: &mut T
) -> Self::Value
impl<F: RefUnwindSafe + FnMut(Vec<u8>) -> Ret, Ret> Test for ClonedSliceTest<F> where
Ret: IntoTestResult,
[src]
Ret: IntoTestResult,
type Value = SliceDebug<Vec<u8>>
fn test<T: TestInput<Result<bool, PanicError>>>(
&mut self,
input: &mut T
) -> Result<bool, PanicError>
[src]
&mut self,
input: &mut T
) -> Result<bool, PanicError>
fn generate_value<T: TestInput<Self::Value>>(
&self,
input: &mut T
) -> Self::Value
[src]
&self,
input: &mut T
) -> Self::Value
impl<F: RefUnwindSafe + FnMut(G::Output) -> Ret, G: RefUnwindSafe + ValueGenerator, Ret> Test for ClonedGeneratorTest<F, G, G::Output> where
Ret: IntoTestResult,
G::Output: RefUnwindSafe + Debug + Clone,
[src]
Ret: IntoTestResult,
G::Output: RefUnwindSafe + Debug + Clone,