[−][src]Trait bolero::Test
Trait for defining a test case
Associated Types
type Value
The input value for the test case
Required methods
fn test<T>(&mut self, input: &mut T) -> Result<bool, PanicError> where
T: TestInput<Result<bool, PanicError>>,
T: TestInput<Result<bool, PanicError>>,
Execute one test with the given input
fn generate_value<T>(&self, input: &mut T) -> Self::Value where
T: TestInput<Self::Value>,
T: TestInput<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
Implementations on Foreign Types
impl<F, Ret> Test for BorrowedSliceTest<F> where
F: RefUnwindSafe + FnMut(&[u8]) -> Ret,
Ret: IntoTestResult,
[src]
F: RefUnwindSafe + FnMut(&[u8]) -> Ret,
Ret: IntoTestResult,
type Value = SliceDebug<Vec<u8>>
fn test<T>(&mut self, input: &mut T) -> Result<bool, PanicError> where
T: TestInput<Result<bool, PanicError>>,
[src]
T: TestInput<Result<bool, PanicError>>,
fn generate_value<T>(
&self,
input: &mut T
) -> <BorrowedSliceTest<F> as Test>::Value where
T: TestInput<<BorrowedSliceTest<F> as Test>::Value>,
[src]
&self,
input: &mut T
) -> <BorrowedSliceTest<F> as Test>::Value where
T: TestInput<<BorrowedSliceTest<F> as Test>::Value>,
impl<F, G, Ret> Test for ClonedGeneratorTest<F, G, <G as ValueGenerator>::Output> where
F: RefUnwindSafe + FnMut(<G as ValueGenerator>::Output) -> Ret,
G: RefUnwindSafe + ValueGenerator,
Ret: IntoTestResult,
<G as ValueGenerator>::Output: RefUnwindSafe,
<G as ValueGenerator>::Output: Debug,
<G as ValueGenerator>::Output: Clone,
[src]
F: RefUnwindSafe + FnMut(<G as ValueGenerator>::Output) -> Ret,
G: RefUnwindSafe + ValueGenerator,
Ret: IntoTestResult,
<G as ValueGenerator>::Output: RefUnwindSafe,
<G as ValueGenerator>::Output: Debug,
<G as ValueGenerator>::Output: Clone,
type Value = <G as ValueGenerator>::Output
fn test<T>(&mut self, input: &mut T) -> Result<bool, PanicError> where
T: TestInput<Result<bool, PanicError>>,
[src]
T: TestInput<Result<bool, PanicError>>,
fn generate_value<T>(
&self,
input: &mut T
) -> <ClonedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value where
T: TestInput<<ClonedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value>,
[src]
&self,
input: &mut T
) -> <ClonedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value where
T: TestInput<<ClonedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value>,
impl<F, G, Ret> Test for BorrowedGeneratorTest<F, G, <G as ValueGenerator>::Output> where
F: RefUnwindSafe + FnMut(&<G as ValueGenerator>::Output) -> Ret,
G: RefUnwindSafe + ValueGenerator,
Ret: IntoTestResult,
<G as ValueGenerator>::Output: RefUnwindSafe,
<G as ValueGenerator>::Output: Debug,
[src]
F: RefUnwindSafe + FnMut(&<G as ValueGenerator>::Output) -> Ret,
G: RefUnwindSafe + ValueGenerator,
Ret: IntoTestResult,
<G as ValueGenerator>::Output: RefUnwindSafe,
<G as ValueGenerator>::Output: Debug,
type Value = <G as ValueGenerator>::Output
fn test<T>(&mut self, input: &mut T) -> Result<bool, PanicError> where
T: TestInput<Result<bool, PanicError>>,
[src]
T: TestInput<Result<bool, PanicError>>,
fn generate_value<T>(
&self,
input: &mut T
) -> <BorrowedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value where
T: TestInput<<BorrowedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value>,
[src]
&self,
input: &mut T
) -> <BorrowedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value where
T: TestInput<<BorrowedGeneratorTest<F, G, <G as ValueGenerator>::Output> as Test>::Value>,
impl<F, Ret> Test for ClonedSliceTest<F> where
F: RefUnwindSafe + FnMut(Vec<u8>) -> Ret,
Ret: IntoTestResult,
[src]
F: RefUnwindSafe + FnMut(Vec<u8>) -> Ret,
Ret: IntoTestResult,
type Value = SliceDebug<Vec<u8>>
fn test<T>(&mut self, input: &mut T) -> Result<bool, PanicError> where
T: TestInput<Result<bool, PanicError>>,
[src]
T: TestInput<Result<bool, PanicError>>,
fn generate_value<T>(
&self,
input: &mut T
) -> <ClonedSliceTest<F> as Test>::Value where
T: TestInput<<ClonedSliceTest<F> as Test>::Value>,
[src]
&self,
input: &mut T
) -> <ClonedSliceTest<F> as Test>::Value where
T: TestInput<<ClonedSliceTest<F> as Test>::Value>,
Implementors
impl<F, Ret> Test for F where
F: RefUnwindSafe + FnMut(&[u8]) -> Ret,
Ret: IntoTestResult,
[src]
F: RefUnwindSafe + FnMut(&[u8]) -> Ret,
Ret: IntoTestResult,