diff options
author | Valery Piashchynski <[email protected]> | 2021-07-08 15:37:12 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-08 15:37:12 +0300 |
commit | eab69b1fdb660973b4c50387d92a79f3662a75fb (patch) | |
tree | c507ac6baac48b4edfca1a7338ff5ccafabaee28 /pkg | |
parent | 05956485a121ee47a2f8281a8a0dffd7eecc68aa (diff) |
maxLen for the binary heaps should be more than 0
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/priorityqueue/binary_heap_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/priorityqueue/binary_heap_test.go b/pkg/priorityqueue/binary_heap_test.go index 53505f52..6be6a99d 100644 --- a/pkg/priorityqueue/binary_heap_test.go +++ b/pkg/priorityqueue/binary_heap_test.go @@ -37,7 +37,7 @@ func (t Test) Priority() uint64 { func TestBinHeap_Init(t *testing.T) { a := []Item{Test(2), Test(23), Test(33), Test(44), Test(1), Test(2), Test(2), Test(2), Test(4), Test(6), Test(99)} - bh := NewBinHeap(0) + bh := NewBinHeap(12) for i := 0; i < len(a); i++ { bh.Insert(a[i]) |