Struct fixt::Predictable [−][src]
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
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
Mutably borrows from an owned value. Read more