BurntSushi / quickcheck

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

Implement Arbitrary for [T: Arbitrary; N] #187

Open boustrophedon opened 6 years ago

boustrophedon commented 6 years ago

Obviously we can't do full generic N until const generics are implemented. I only wanted it for 3 [f32; 2]s anyway (and settled for six f32s in my function's parameters) and I'd be happy to send a pull request for just [T: Arbitrary; k] for a few small ks if that's good with you.

BurntSushi commented 6 years ago

I think historically I've decided to not include these impls because of the compile time hit, with the hope that we could some day provide them with const generics.

I'm not convinced of this position btw. I suppose anyone that tries this should compare compile times.