Closed Marwes closed 9 years ago
\o/
This. Is. Awesome!!
RE empty vec: I can't remember precisely why I did this, I probably thought "check a common corner case first." I don't have a strong opinion about it, but it does seem like a sensible thing to do unless there are downsides that I'm not considering.
I've uploaded this to crates.io in 0.2.14
.
I'm not entirely familiar with the inner workings of quickcheck but running verboseCheck in Haskell it seems that the empty list is naturally generated since it starts by testing small values. Not sure if you do this though.
Adds lazy shrinking for Vec. I have not bench marked this implementation but considering that it does not additional work it should be roughly as fast when the entire iterator is used and significantly faster otherwise.
I added the behavior where the empty vector is added as the first element to the iterator though I could not find this behavior in quickcheck for haskell. Considering how the shrunk vectors actually looks I'd be partial to removing that special case in case I can update this PR.
Fixes #4.