diff --git a/recompute_heap_test.go b/recompute_heap_test.go index 3394e59..c16572d 100644 --- a/recompute_heap_test.go +++ b/recompute_heap_test.go @@ -411,6 +411,10 @@ func Test_recomputeHeap_clear(t *testing.T) { rh.add(n60) rh.add(n70) + testutil.NotEqual(t, HeightUnset, n50.n.heightInRecomputeHeap) + testutil.NotEqual(t, HeightUnset, n60.n.heightInRecomputeHeap) + testutil.NotEqual(t, HeightUnset, n70.n.heightInRecomputeHeap) + testutil.Equal(t, 3, rh.numItems) testutil.Equal(t, 1, rh.heights[5].len()) testutil.Equal(t, 1, rh.heights[6].len()) @@ -420,6 +424,10 @@ func Test_recomputeHeap_clear(t *testing.T) { rh.clear() + testutil.Equal(t, HeightUnset, n50.n.heightInRecomputeHeap) + testutil.Equal(t, HeightUnset, n60.n.heightInRecomputeHeap) + testutil.Equal(t, HeightUnset, n70.n.heightInRecomputeHeap) + testutil.Equal(t, 0, rh.numItems) testutil.Equal(t, 0, rh.heights[5].len()) testutil.Equal(t, 0, rh.heights[6].len()) @@ -431,6 +439,10 @@ func Test_recomputeHeap_clear(t *testing.T) { rh.add(n60) rh.add(n70) + testutil.NotEqual(t, HeightUnset, n50.n.heightInRecomputeHeap) + testutil.NotEqual(t, HeightUnset, n60.n.heightInRecomputeHeap) + testutil.NotEqual(t, HeightUnset, n70.n.heightInRecomputeHeap) + testutil.Equal(t, 3, rh.numItems) testutil.Equal(t, 1, rh.heights[5].len()) testutil.Equal(t, 1, rh.heights[6].len())