You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating random values from a fuzzer, there is no guarantee that each one will be unique. You may ask for 100 cases but get less. It may be possible you get much less.
One solution is to hash each input, store the hashes, and reject inputs with a duplicate hash. We'd need to fail the test after some number of failed attempts to create distinct inputs, perhaps max 20 (2*numberOfRequestedRuns).
Since we'd want a designated union type tag for this failure condition, it makes sense to do this while we're doing a major revision.
Is there any interest in exploring this idea?
The text was updated successfully, but these errors were encountered:
There definitely is, but I'd like to pair this with knowing roughly how many possible values a fuzzer can produce. No reason to keep generating booleans to try to find a third value. Also, we probably want to generate more values if we're fuzzing a huge thing, like a Dict (Int, Int) (List String).
No reason to keep generating booleans to try to find a third value.
The status quo is that you still keep generating booleans, and run the toExpectation function to boot.
I think we could do this optimization separately (retry generating if we've already tested an input for a test -- skipping some toExpectation calls), and then there is the separate issue of generating all values exhaustively if the fuzzer allows it. I'll create an issue for that one as I and @gampleman have some thoughts around it already :)
When generating random values from a fuzzer, there is no guarantee that each one will be unique. You may ask for 100 cases but get less. It may be possible you get much less.
One solution is to hash each input, store the hashes, and reject inputs with a duplicate hash. We'd need to fail the test after some number of failed attempts to create distinct inputs, perhaps
max 20 (2*numberOfRequestedRuns)
.Since we'd want a designated union type tag for this failure condition, it makes sense to do this while we're doing a major revision.
Is there any interest in exploring this idea?
The text was updated successfully, but these errors were encountered: