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

Function TestEncodeBulkBytes

pkg/proxy/redis/encoder_test.go:58–65  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestEncodeBulkBytes(t *testing.T) {
59 resp := NewBulkBytes(nil)
60 testEncodeAndCheck(t, resp, []byte("$-1\r\n"))
61 resp.Value = []byte{}
62 testEncodeAndCheck(t, resp, []byte("$0\r\n\r\n"))
63 resp.Value = []byte("helloworld!!")
64 testEncodeAndCheck(t, resp, []byte("$12\r\nhelloworld!!\r\n"))
65}
66
67func TestEncodeArray(t *testing.T) {
68 resp := NewArray(nil)

Callers

nothing calls this directly

Calls 2

NewBulkBytesFunction · 0.85
testEncodeAndCheckFunction · 0.85

Tested by

no test coverage detected