StrlenEqual verify that the return value of the strlen operation is correct
(t *testing.T, key string)
| 218 | |
| 219 | //StrlenEqual verify that the return value of the strlen operation is correct |
| 220 | func (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 |
| 233 | func (es *ExampleString) StrlenEqualErr(t *testing.T, errValue string, args ...interface{}) { |