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§
source§impl Clone for Predictable
impl Clone for Predictable
source§fn clone(&self) -> Predictable
fn clone(&self) -> Predictable
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more