1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 00:22:41 +08:00
This commit is contained in:
2022-03-27 10:23:06 +08:00
parent 4dc4f7ad11
commit 38d75633d9
6 changed files with 246 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package collections
import "testing"
func TestCircleQueue(t *testing.T) {
q := NewCircleQueue(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())
}