hedgehogqa / haskell-hedgehog-classes

Hedgehog will eat your typeclass bugs
BSD 3-Clause "New" or "Revised" License
56 stars 17 forks source link

storableSetGet uses wrong bounds on list #18

Closed ag-eitilt closed 5 years ago

ag-eitilt commented 5 years ago

Rather than using the genSmallNonEmptyList that storableGetSet does, storableSetGet generates the length of the list independently, and then uses that number to generate its array of test objects. However, it does so in a way that allows empty lists, which then throw everything off culminating in malloc errors crashing the test suite. The solution seems to be simply changing the 0 on that line to 1; I didn't want to go through an entire branch+PR cycle for a single-byte change.

chessai commented 5 years ago

Fixed, thanks!