leanovate / gopter

GOlang Property TestER
MIT License
598 stars 40 forks source link

Fix panic when MinSize == MaxSize #19

Closed johanbrandhorst closed 7 years ago

johanbrandhorst commented 7 years ago

This was a slight oversight in my last pull request, Intn panics for negative and zero values. This ensures MaxSize - MinSize should always be >= 1.

codecov-io commented 7 years ago

Codecov Report

Merging #19 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage   95.42%   95.43%   +<.01%     
==========================================
  Files          50       50              
  Lines        1990     1994       +4     
==========================================
+ Hits         1899     1903       +4     
  Misses         56       56              
  Partials       35       35
Impacted Files Coverage Δ
gen/slice_of.go 94.91% <100%> (+0.36%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 14b2ccf...e9744d6. Read the comment docs.

johanbrandhorst commented 7 years ago

I need to make another change here, don't merge this yet.

johanbrandhorst commented 7 years ago

There we go, that seems to be the least incriminating change to fix this.