(ay []interface{}, checkValues ...interface{})
| 203 | } |
| 204 | |
| 205 | func testZSetRange(ay []interface{}, checkValues ...interface{}) error { |
| 206 | if len(ay) != len(checkValues) { |
| 207 | return fmt.Errorf("invalid return number %d != %d", len(ay), len(checkValues)) |
| 208 | } |
| 209 | |
| 210 | for i := 0; i < len(ay); i++ { |
| 211 | switch cv := checkValues[i].(type) { |
| 212 | case string: |
| 213 | v := cast.ToString(ay[i]) |
| 214 | if v != cv { |
| 215 | return fmt.Errorf("not equal %s != %s", v, checkValues[i]) |
| 216 | } |
| 217 | default: |
| 218 | if s, _ := cast.ToIntE(ay[i]); s != checkValues[i] { |
| 219 | return fmt.Errorf("not equal %v != %v", s, checkValues[i]) |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | } |
| 224 | |
| 225 | return nil |
| 226 | } |
| 227 | |
| 228 | func TestZSetRangeScore(t *testing.T) { |
| 229 | c := getTestConn() |
no outgoing calls
no test coverage detected