func testHeapObjectKeyFunc(obj interface{ … } type testHeapObject … func mkHeapObj(name string, val interface{ … } func compareInts(val1 interface{ … } // TestHeapBasic tests Heap invariant and synchronization. func TestHeapBasic(t *testing.T) { … } // Tests Heap.Add and ensures that heap invariant is preserved after adding items. func TestHeap_Add(t *testing.T) { … } // TestHeap_BulkAdd tests Heap.BulkAdd functionality and ensures that all the // items given to BulkAdd are added to the queue before Pop reads them. func TestHeap_BulkAdd(t *testing.T) { … } // TestHeapEmptyPop tests that pop returns properly after heap is closed. func TestHeapEmptyPop(t *testing.T) { … } // TestHeap_AddIfNotPresent tests Heap.AddIfNotPresent and ensures that heap // invariant is preserved after adding items. func TestHeap_AddIfNotPresent(t *testing.T) { … } // TestHeap_Delete tests Heap.Delete and ensures that heap invariant is // preserved after deleting items. func TestHeap_Delete(t *testing.T) { … } // TestHeap_Update tests Heap.Update and ensures that heap invariant is // preserved after adding items. func TestHeap_Update(t *testing.T) { … } // TestHeap_Get tests Heap.Get. func TestHeap_Get(t *testing.T) { … } // TestHeap_GetByKey tests Heap.GetByKey and is very similar to TestHeap_Get. func TestHeap_GetByKey(t *testing.T) { … } // TestHeap_Close tests Heap.Close and Heap.IsClosed functions. func TestHeap_Close(t *testing.T) { … } // TestHeap_List tests Heap.List function. func TestHeap_List(t *testing.T) { … } // TestHeap_ListKeys tests Heap.ListKeys function. Scenario is the same as // TestHeap_list. func TestHeap_ListKeys(t *testing.T) { … } // TestHeapAddAfterClose tests that heap returns an error if anything is added // after it is closed. func TestHeapAddAfterClose(t *testing.T) { … }