From a57eab1184702cc7d89ebaef9db52f874be89a10 Mon Sep 17 00:00:00 2001 From: bandl <1658002533@qq.com> Date: Mon, 29 Nov 2021 23:35:46 +0800 Subject: [PATCH] test(channex): add channelx test --- pkg/structure/channelx/channelx_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/structure/channelx/channelx_test.go b/pkg/structure/channelx/channelx_test.go index 7fffdf9..32127d8 100644 --- a/pkg/structure/channelx/channelx_test.go +++ b/pkg/structure/channelx/channelx_test.go @@ -14,6 +14,11 @@ func TestChannelX_Push(t *testing.T) { require.Equal(t, 24, int(up)) res, up := c.Pop() - require.Equal(t, 24, int(up)) + require.Equal(t, -24, int(up)) require.Equal(t, res, "111") + + up = c.Push("111") + c.CLean() + + require.Equal(t, c.Length(), 0) }