Merge unsigned() and signed() search strategies into felts() strategy
This PR replaces the unsigned() and signed() fuzzing search strategies with a new (and now default) search strategy called simply felts().
From Cairo code perspective, both strategies observed the same range of values, due to the modulo arithmetic of felts. The only difference between these two strategies laid in a method how input values were picked.
I did a bunch of benchmarks and I have concluded that exploring felts in range MIN_FELT...MAX_FELT made Hypothesis pick more variadic set of values. signed() explored almost always around 30% more distinct values than unsigned().
Therefore, the felts() strategy has the same behaviour as former signed().
fix #597
Codecov Report
Merging #601 (2ae08d8) into master (ac36eb1) will increase coverage by
0.02%. The diff coverage is91.11%.
@@ Coverage Diff @@
## master #601 +/- ##
==========================================
+ Coverage 82.72% 82.74% +0.02%
==========================================
Files 189 190 +1
Lines 6279 6282 +3
==========================================
+ Hits 5194 5198 +4
+ Misses 1085 1084 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ostar/commands/test/fuzzing/strategies/integers.py | 78.57% <78.57%> (ø) |
|
| ...rotostar/commands/test/fuzzing/strategies/felts.py | 91.66% <91.66%> (ø) |
|
| ...ostar/commands/test/fuzzing/strategies/__init__.py | 83.33% <100.00%> (+1.51%) |
:arrow_up: |
| ...otostar/commands/test/fuzzing/strategy_selector.py | 100.00% <100.00%> (ø) |
|
| ...ar/commands/test/fuzzing/strategy_selector_test.py | 100.00% <100.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.