MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / checkScanValues

Function checkScanValues

scan_test.go:28–44  ·  view source on GitHub ↗
(t *testing.T, ay interface{}, values ...interface{})

Source from the content-addressed store, hash-verified

26}
27
28func 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
46func checkScan(t *testing.T, c *redis.Client, tp string) {
47 ctx := context.Background()

Callers 7

checkScanFunction · 0.85
TestXHashScanFunction · 0.85
TestHashScanFunction · 0.85
TestXSetScanFunction · 0.85
TestSetScanFunction · 0.85
TestXZSetScanFunction · 0.85
TestZSetScanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected