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

Function TestZSetScan

scan_test.go:203–217  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestZSetScan(t *testing.T) {
204 c := getTestConn()
205 ctx := context.Background()
206
207 key := "scan_zset"
208 c.Do(ctx, "ZADD", key, 1, "a", 2, "b")
209
210 if ay, err := c.Do(ctx, "XZSCAN", key, "0").Result(); err != nil {
211 t.Fatal(err)
212 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
213 t.Fatal(len(ay))
214 } else {
215 checkScanValues(t, ay[1], "a", "1", "b", "2")
216 }
217}

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected