MSetEqual verify that the return value of the mset operation is correct
(t *testing.T, args ...string)
| 260 | |
| 261 | //MSetEqual verify that the return value of the mset operation is correct |
| 262 | func (es *ExampleString) MSetEqual(t *testing.T, args ...string) { |
| 263 | as := make([]interface{}, len(args)) |
| 264 | for i := 0; i < len(args); i = i + 2 { |
| 265 | es.values[args[i]] = args[i+1] |
| 266 | as[i] = args[i] |
| 267 | as[i+1] = args[i+1] |
| 268 | } |
| 269 | reply, err := redis.String(es.conn.Do("MSET", as...)) |
| 270 | assert.NoError(t, err) |
| 271 | assert.Equal(t, "OK", reply) |
| 272 | |
| 273 | for i := 0; i < len(args); i = i + 2 { |
| 274 | es.GetEqual(t, args[i]) |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | //MSetEqualErr verify that the return value of the mset operation is correct |
| 279 | func (es *ExampleString) MSetEqualErr(t *testing.T, errValue string, args ...interface{}) { |
no test coverage detected