shrink method
Generates an Iterable of Shrinkable
s that fulfill the following
criteria:
- They are similar to this: They only differ in little ways.
- They are simpler than this: The transitive hull is finite acyclic. If you would call shrink on all returned values and on the values returned by them etc., this process should terminate sometime.
Implementation
@override
Iterable<Shrinkable<T?>> shrink() {
final shrinkableNull = Shrinkable<T?>(null, () => []);
return originalValue
.shrink()
.cast<Shrinkable<T?>>()
.followedBy([shrinkableNull]);
}