flyingmutant / rapid

Rapid is a modern Go property-based testing library
https://pkg.go.dev/pgregory.net/rapid
Mozilla Public License 2.0
579 stars 25 forks source link

Shrink regex-generated strings #29

Closed mtaran closed 2 years ago

mtaran commented 2 years ago

Currently it doesn't seem like shrinking is applied to regex-generated strings. This would be very useful in a lot of cases (though not so much in e.g. the IPv4 example). Or is shrinking done for those already? I couldn't find a shrunken output in my testing, only a very long example.

flyingmutant commented 2 years ago

Hm, that's strange. There are no exceptions, the same (simple) shrinking is used for everything. Can you provide an example where rapid fails to properly shrink regexp-generated string?