1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-17 16:12:42 +08:00
Files
go-mixed/collections/circlequeue_test.go
2022-05-04 23:46:48 +08:00

23 lines
328 B
Go

package collections
import "testing"
func TestCircleQueue(t *testing.T) {
q := NewCircleQueue[string](10)
t.Log("Size:", q.Size())
for i := 0; i < 10; i++ {
t.Log(q.Push(i))
}
t.Log("Size:", q.Size())
t.Log("IsFull:", q.IsFull())
t.Log("Show:", q.Show())
q.Pop()
q.Push(11)
q.Pop()
t.Log("Show:", q.Show())
}