MGetEqual verify that the return value of the mget operation is correct
(t *testing.T, args ...string)
| 237 | |
| 238 | //MGetEqual verify that the return value of the mget operation is correct |
| 239 | func (es *ExampleString) MGetEqual(t *testing.T, args ...string) { |
| 240 | as := make([]interface{}, len(args)) |
| 241 | for i, a := range args { |
| 242 | as[i] = a |
| 243 | } |
| 244 | reply, err := redis.Strings(es.conn.Do("MGET", as...)) |
| 245 | assert.NoError(t, err) |
| 246 | for i, a := range args { |
| 247 | if expects, ok := es.values[a]; ok { |
| 248 | assert.Equal(t, expects, reply[i]) |
| 249 | } else { |
| 250 | assert.Equal(t, "", reply[i]) |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | //MGetEqualErr verify that the return value of the mget operation is correct |
| 256 | func (es *ExampleString) MGetEqualErr(t *testing.T, errValue string, args ...interface{}) { |
no test coverage detected