[−][src]Trait proptest::test_runner::FailurePersistence
Provides external persistence for historical test failures by storing seeds.
Note: Implementing load_persisted_failures
and
save_persisted_failures
is deprecated and these methods will be
removed in proptest 0.10.0. Instead, implement load_persisted_failures2
and save_persisted_failures2
.
Required methods
fn box_clone(&self) -> Box<dyn FailurePersistence>ⓘNotable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
Notable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
Delegate method for producing a trait object usable with Clone
fn eq(&self, other: &dyn FailurePersistence) -> bool
Equality testing delegate required due to constraints of trait objects.
fn as_any(&self) -> &dyn Any
Assistant method for trait object comparison.
Provided methods
fn load_persisted_failures2(
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
Supply seeds associated with the given source_file
that may be used
by a TestRunner
's random number generator in order to consistently
recreate a previously-failing Strategy
-provided value.
The default implementation is for backwards compatibility. It
delegates to load_persisted_failures
and converts the results into
XorShift seeds.
fn load_persisted_failures(
&self,
source_file: Option<&'static str>
) -> Vec<[u8; 16]>ⓘ
&self,
source_file: Option<&'static str>
) -> Vec<[u8; 16]>ⓘ
Use load_persisted_failures2
instead.
This function inadvertently exposes the implementation of seeds prior to Proptest 0.9.1 and only works with XorShift seeds.
fn save_persisted_failure2(
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
shrunken_value: &dyn Debug
)
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
shrunken_value: &dyn Debug
)
Store a new failure-generating seed associated with the given source_file
.
The default implementation is for backwards compatibility. It
delegates to save_persisted_failure
if seed
is a XorShift seed.
fn save_persisted_failure(
&mut self,
source_file: Option<&'static str>,
seed: [u8; 16],
shrunken_value: &dyn Debug
)
&mut self,
source_file: Option<&'static str>,
seed: [u8; 16],
shrunken_value: &dyn Debug
)
Use save_persisted_failures2
instead.
This function inadvertently exposes the implementation of seeds prior to Proptest 0.9.1 and only works with XorShift seeds.
Trait Implementations
impl<'a, 'b> PartialEq<dyn FailurePersistence + 'b> for dyn FailurePersistence + 'a
[src]
Implementors
impl FailurePersistence for FileFailurePersistence
[src]
fn load_persisted_failures2(
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
[src]
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
fn save_persisted_failure2(
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
shrunken_value: &dyn Debug
)
[src]
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
shrunken_value: &dyn Debug
)
fn box_clone(&self) -> Box<dyn FailurePersistence>ⓘNotable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
fn eq(&self, other: &dyn FailurePersistence) -> bool
[src]
fn as_any(&self) -> &dyn Any
[src]
impl FailurePersistence for MapFailurePersistence
[src]
fn load_persisted_failures2(
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
[src]
&self,
source_file: Option<&'static str>
) -> Vec<PersistedSeed>ⓘ
fn save_persisted_failure2(
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
_shrunken_value: &dyn Debug
)
[src]
&mut self,
source_file: Option<&'static str>,
seed: PersistedSeed,
_shrunken_value: &dyn Debug
)
fn box_clone(&self) -> Box<dyn FailurePersistence>ⓘNotable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
Notable traits for Box<W>
impl<W> Write for Box<W> where
W: Write + ?Sized, impl<R> Read for Box<R> where
R: Read + ?Sized, impl<F> Future for Box<F> where
F: Unpin + Future + ?Sized, type Output = <F as Future>::Output;impl<I> Iterator for Box<I> where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;