More testing code for heaps