test(channex): add channelx test

This commit is contained in:
bandl 2021-11-29 23:35:46 +08:00
parent ef4cbb0cee
commit a57eab1184
1 changed files with 6 additions and 1 deletions

View File

@ -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)
}