SetNxEqualErr verify that the return value of the set operation is correct
(t *testing.T, key string, value string)
| 55 | |
| 56 | //SetNxEqualErr verify that the return value of the set operation is correct |
| 57 | func (es *ExampleString) SetNxEqual(t *testing.T, key string, value string) { |
| 58 | es.values[key] = value |
| 59 | reply, err := redis.Int(es.conn.Do("SETNX", key, value)) |
| 60 | assert.Equal(t, 1, reply) |
| 61 | assert.NoError(t, err) |
| 62 | data, err := redis.Bytes(es.conn.Do("GET", key)) |
| 63 | assert.Equal(t, value, string(data)) |
| 64 | assert.NoError(t, err) |
| 65 | } |
| 66 | |
| 67 | //SetExEqualErr verify that the return value of the set operation is correct |
| 68 | func (es *ExampleString) SetExEqual(t *testing.T, key string, value string, delta int) { |