Struct fixt::Predictable
source · [−]pub struct Predictable;
Expand description
represents a predictable curve
a predictable curve simply iterates over some known progression of values in the same way every test run.
predictable curves can be convenient, or even necessary, if an unpredictable curve breaks our ability to make specific assertions about our code.
for example, we may want to demonstrate that additon works. with an unpredictable curve we can assert things like the arguments being commutative, associative, additive, etc. but then we quickly end up doing a bad version of property testing. better to assert known expected results of addition from various values from a predictable curve and then subject the addition function to real property testing with a dedicated tool.
this curve is provided as a standard option because there is a real, common tradeoff between test fragility (accuracy) and specificity (precision).
Trait Implementations
sourceimpl Clone for Predictable
impl Clone for Predictable
sourcefn clone(&self) -> Predictable
fn clone(&self) -> Predictable
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Predictable
Auto Trait Implementations
impl RefUnwindSafe for Predictable
impl Send for Predictable
impl Sync for Predictable
impl Unpin for Predictable
impl UnwindSafe for Predictable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more