From 88511ca78e940fe18d2da9b9810b768ecf3d0160 Mon Sep 17 00:00:00 2001 From: Will Charczuk Date: Mon, 15 Jul 2024 15:32:46 -0700 Subject: [PATCH] test --- recompute_heap_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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())