(t *testing.T, ay interface{}, values ...interface{})
| 26 | } |
| 27 | |
| 28 | func checkScanValues(t *testing.T, ay interface{}, values ...interface{}) { |
| 29 | a, ok := ay.([]interface{}) |
| 30 | |
| 31 | if !ok { |
| 32 | t.Fatal("checkScanValues result not array", ay) |
| 33 | } |
| 34 | |
| 35 | if len(a) != len(values) { |
| 36 | t.Fatal(fmt.Sprintf("len %d != %d", len(a), len(values))) |
| 37 | } |
| 38 | |
| 39 | for i, v := range a { |
| 40 | if v, ok := v.(string); !ok || v != fmt.Sprintf("%v", values[i]) { |
| 41 | t.Fatal(fmt.Sprintf("%d %s != %v", i, v, values[i])) |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func checkScan(t *testing.T, c *redis.Client, tp string) { |
| 47 | ctx := context.Background() |
no outgoing calls
no test coverage detected