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

Function TestXZSetScan

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

Source from the content-addressed store, hash-verified

185}
186
187func TestXZSetScan(t *testing.T) {
188 c := getTestConn()
189 ctx := context.Background()
190
191 key := "scan_zset"
192 c.Do(ctx, "ZADD", key, 1, "a", 2, "b")
193
194 if ay, err := c.Do(ctx, "XZSCAN", key, "").Result(); err != nil {
195 t.Fatal(err)
196 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
197 t.Fatal(len(ay))
198 } else {
199 checkScanValues(t, ay[1], "a", "1", "b", "2")
200 }
201}
202
203func TestZSetScan(t *testing.T) {
204 c := getTestConn()

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected