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

Method StrlenEqual

tools/autotest/cmd/string.go:220–230  ·  view source on GitHub ↗

StrlenEqual verify that the return value of the strlen operation is correct

(t *testing.T, key string)

Source from the content-addressed store, hash-verified

218
219//StrlenEqual verify that the return value of the strlen operation is correct
220func (es *ExampleString) StrlenEqual(t *testing.T, key string) {
221 var vi int
222 if v, ok := es.values[key]; ok {
223 vi = len(v)
224 } else {
225 vi = 0
226 }
227 reply, err := redis.Int(es.conn.Do("strlen", key))
228 assert.Equal(t, vi, reply)
229 assert.NoError(t, err)
230}
231
232//StrlenEqualErr verify that the return value of the strlen operation is correct
233func (es *ExampleString) StrlenEqualErr(t *testing.T, errValue string, args ...interface{}) {

Callers 1

StringCaseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected