package main import ( "container/heap" "testing" "github.com/go-playground/assert/v2" ) func TestPriorityQueue(t *testing.T) { //t.Skip("skipping test") pq := newPriorityQueue() heap.Push(pq, newNode(30, 0, 0, 0, 0, 0)) heap.Push(pq, newNode(10, 0, 0, 0, 8, 0)) heap.Push(pq, newNode(20, 0, 0, 0, 13, 0)) t.Run("Should create a queue size 3", func(t *testing.T) { assert.Equal(t, 3, pq.Len()) }) item := heap.Pop(pq).(*node) t.Run("Should return item with cost 10", func(t *testing.T) { assert.Equal(t, 10, item.cost) }) }