BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

Implement Arbitrary for fixed-sized arrays of Arbitrary elements #289

Closed nbraud closed 3 years ago

nbraud commented 3 years ago

I tried implementing a non-trivial shrinker, but this ended up requiring T: Clone and a lot of lifetime issues, so it seemed better to keep the dummy shrinker.

This PR depends on const generics, so that would bump the MSRV to 1.51 and require a minor release. Alternatively, this functionality could be hidden behind an opt-in feature flag.

BurntSushi commented 3 years ago

This looks like a duplicate of #282.

nbraud commented 3 years ago

@BurntSushi Oops, yes, I missed that there was an open PR for it (apparently I only checked whether an issue existed...) Sorry about that, feel free to close if the version in #282 is preferred.

nbraud commented 3 years ago

I just saw the comment saying you'd rather not use array-init, closing. Again, sorry for missing the existing PR >_>'