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

Method SetEqual

tools/autotest/cmd/string.go:27–35  ·  view source on GitHub ↗

SetEqual verify that the return value of the set operation is correct

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

Source from the content-addressed store, hash-verified

25
26//SetEqual verify that the return value of the set operation is correct
27func (es *ExampleString) SetEqual(t *testing.T, key string, value string) {
28 es.values[key] = value
29 reply, err := redis.String(es.conn.Do("SET", key, value))
30 assert.Equal(t, "OK", reply)
31 assert.NoError(t, err)
32 data, err := redis.Bytes(es.conn.Do("GET", key))
33 assert.Equal(t, value, string(data))
34 assert.NoError(t, err)
35}
36
37//GetEqual verify that the return value of the get operation is correct
38func (es *ExampleString) GetEqual(t *testing.T, key string) {

Callers 4

ListCaseMethod · 0.80
ZSetCaseMethod · 0.80
StringCaseMethod · 0.80
KeyCaseMethod · 0.80

Calls 2

BytesMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected