elm-explorations / elm-explorations/test
Hash fuzzed input to detect duplicates?
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.