Update gqueue_unit_test.go

This commit is contained in:
jroam
2019-06-17 11:40:40 +08:00
parent fd4843c3a1
commit 53b5de330e

View File

@ -25,18 +25,7 @@ func TestQueue_Pop(t *testing.T) {
q1.Push(4)
i1 := q1.Pop()
gtest.Assert(i1, 1)
q1.Close()
i1 = q1.Pop()
gtest.Assert(i1, 2)
maxs := 12
q2 := gqueue.New(maxs)
for i := 0; i < maxs; i++ {
q2.Push(i)
}
i3 := q2.Pop()
gtest.Assert(i3, 0)
}
func TestQueue_Close(t *testing.T) {
@ -44,8 +33,5 @@ func TestQueue_Close(t *testing.T) {
q1.Push(1)
q1.Push(2)
gtest.Assert(q1.Len(), 2)
q1.Close()
gtest.Assert(q1.Len(), 2)
}