Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 1.72 KB

binheap.md

File metadata and controls

21 lines (15 loc) · 1.72 KB

Wrong Binary Heap

Original source

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.

Implementors

Library Code Report
Americium HeapTest.java binheap.md
jqwik BinheapProperties.java binheap.md
CsCheck ShrinkingChallengeTests.cs binheap.md
elm-test BinHeap.elm binHeap.md