This is based on an example from QuickCheck's test suite (via the SmartCheck paper). It generates binary heaps, and then uses a wrong implementation of a function that converts the binary heap to a sorted list and asserts that the result is sorted.
Interestingly most libraries seem to never find the smallest example here, which is the four valued heap (0, None, (0, (0, None, None), (1, None, None))). This is essentially because small examples are "too sparse", so it's very hard to find one by luck.
Library | Code | Report |
---|---|---|
Americium | HeapTest.java | binheap.md |
jqwik | BinheapProperties.java | binheap.md |
CsCheck | ShrinkingChallengeTests.cs | binheap.md |
elm-test | BinHeap.elm | binHeap.md |