From a7f15a4e00a178f8308e6db9c4497fb07d3b5f5e Mon Sep 17 00:00:00 2001 From: jroam Date: Sat, 15 Jun 2019 21:40:36 +0800 Subject: [PATCH] change gqueue unit tests --- g/container/gqueue/gqueue_unit_test.go | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/g/container/gqueue/gqueue_unit_test.go b/g/container/gqueue/gqueue_unit_test.go index d5f76f4fc..2e187dab9 100644 --- a/g/container/gqueue/gqueue_unit_test.go +++ b/g/container/gqueue/gqueue_unit_test.go @@ -7,27 +7,17 @@ import ( ) func TestQueue_Len(t *testing.T) { - q1 := gqueue.New(2) + q1 := gqueue.New() q1.Push(1) - q1.Push(2) + q1.Push(5) gtest.Assert(q1.Len(), 2) - gtest.Assert(q1.Size(), 2) } func TestQueue_Pop(t *testing.T) { q1 := gqueue.New() q1.Push(1) q1.Push(2) - q1.Push(3) - i1 := q1.Pop() + i1:=q1.Pop() gtest.Assert(i1, 1) } -func TestQueue_Close(t *testing.T) { - q1 := gqueue.New() - q1.Push(1) - q1.Push(2) - gtest.Assert(q1.Len(), 2) - q1.Close() - gtest.Assert(q1.Len(), 2) -}