diff --git a/shrink.go b/shrink.go index 370b5ba..86d07d4 100644 --- a/shrink.go +++ b/shrink.go @@ -5,8 +5,14 @@ import ( "reflect" ) -// Shrink is a stream of shrinked down values -// Once the result of a shrink is false, it is considered to be exhausted +// Shrink is a stream of shrinked down values. +// Once the result of a shrink is false, it is considered to be exhausted. +// Important notes for implementors: +// * Ensure that the returned stream is finite, even though shrinking will +// eventually be aborted, infinite streams may result in very slow running +// test. +// * Ensure that modifications to the returned value will not affect the +// internal state of your Shrink. If in doubt return by value not by reference type Shrink func() (interface{}, bool) // Filter creates a shrink filtered by a condition