MCPcopy Create free account
hub / github.com/distributedio/titan / AppendEqual

Method AppendEqual

tools/autotest/cmd/string.go:113–125  ·  view source on GitHub ↗

AppendEqual verify that the return value of the append operation is correct

(t *testing.T, key string, value string)

Source from the content-addressed store, hash-verified

111
112//AppendEqual verify that the return value of the append operation is correct
113func (es *ExampleString) AppendEqual(t *testing.T, key string, value string) {
114 if v, ok := es.values[key]; ok {
115 es.values[key] = v + value
116 } else {
117 es.values[key] = value
118 }
119 reply, err := redis.Int(es.conn.Do("Append", key, value))
120 assert.Equal(t, len(es.values[key]), reply)
121 assert.NoError(t, err)
122 data, err := redis.Bytes(es.conn.Do("GET", key))
123 assert.Equal(t, es.values[key], string(data))
124 assert.NoError(t, err)
125}
126
127//AppendEqualErr TODO
128func (es *ExampleString) AppendEqualErr(t *testing.T, errValue string, args ...interface{}) {

Callers 1

StringCaseMethod · 0.80

Calls 1

BytesMethod · 0.80

Tested by

no test coverage detected