馃懛馃摎馃[feature/issues/107] Shrinker for Ptr generator #108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Problem]
However Ptr doesn't provide shrinker that can shrink pointer to nil. (it only shrinks the value that it points to).
[Solution]
Add Ptr shrinker. Ptr shrinker treats value that it points as an element. This allows usage of CollectionSizeRemoveFront and CollectionElementOne shrinkers to be used to compose Ptr shrinker.
Ptr and PtrTo have been merged into Ptr generator.
Add constraints.Ptr to control generation of nil values. Add arbitrary.NewPtr function that builds pointer from arbitrary.
[Test]
Update tests to reflect removal of PtrTo generator Add tests for Ptr shrinker
[Docs]
Update documentation for Ptr generator and it's examples
[Note]
Examples for weighted and recursive generator have been updated as well because Ptr generator used int these tests now generates different values
Close #107