pub trait Test: Sized {
type Value;
// Required methods
fn test<T: Input<Result<bool, PanicError>>>(
&mut self,
input: &mut T,
) -> Result<bool, PanicError>;
fn generate_value<T: Input<Self::Value>>(
&self,
input: &mut T,
) -> Self::Value;
// Provided method
fn shrink<I: Input>(
&mut self,
input: I,
seed: Option<Seed>,
options: &Options,
) -> Option<Failure<Self::Value>> { ... }
}Expand description
Trait for defining a test case
Required Associated Types§
Required Methods§
Sourcefn test<T: Input<Result<bool, PanicError>>>(
&mut self,
input: &mut T,
) -> Result<bool, PanicError>
fn test<T: Input<Result<bool, PanicError>>>( &mut self, input: &mut T, ) -> Result<bool, PanicError>
Execute one test with the given input
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.