MCPcopy Index your code
hub / github.com/CodisLabs/codis / TestDecodeBulkBytes

Function TestDecodeBulkBytes

pkg/proxy/redis/decoder_test.go:80–89  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestDecodeBulkBytes(t *testing.T) {
81 test := "*2\r\n$4\r\nLLEN\r\n$6\r\nmylist\r\n"
82 resp, err := DecodeFromBytes([]byte(test))
83 assert.MustNoError(err)
84 assert.Must(len(resp.Array) == 2)
85 s1 := resp.Array[0]
86 assert.Must(bytes.Equal(s1.Value, []byte("LLEN")))
87 s2 := resp.Array[1]
88 assert.Must(bytes.Equal(s2.Value, []byte("mylist")))
89}
90
91func TestDecoder(t *testing.T) {
92 test := []string{

Callers

nothing calls this directly

Calls 1

DecodeFromBytesFunction · 0.85

Tested by

no test coverage detected