silentbicycle / skiparray

unrolled skip list library for C
ISC License
21 stars 2 forks source link

Test integrity on allocation failure #8

Open silentbicycle opened 5 years ago

silentbicycle commented 5 years ago

The memory allocation callback returning NULL should be handled safely -- it should not lead the overall collection in an inconsistent state.

The property test could check this, where a custom memory hook is used that fails on the Nth allocation (and the model update also accounts for the operation failing), and the allocation failure(s) are set at generation time.