Closed pierre-fastly closed 1 year ago
Can there be a case where you custom generator does not, in fact, use any data from the bitstream? This can happen when it under some conditions never calls one of the built-in generators (which should always draw some data even when they end up not generating anything).
Here's an example:
_ = rapid.Permutation([]int{1}).Draw(t, "foo")
This will trigger the ^ error.
@bilus thanks for the Permutation
case, good catch! I've found and fixed one more (for 0-field structs generated with Make
), I hope there are no other built-in generators with this problem. Feel free to reopen this issue in case the error will strike back!
I have a generator + a filter and try to draw from this. And in some cases, I get this error:
I'm unsure how to fix this TBH. My guess is the filter filters everything and rapid gives up at some point but... that's just a guess.
Also, the test I have is pretty huge, I cannot reproduce this with a small example. Any idea what I can try?