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

Function TestXSetScan

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

Source from the content-addressed store, hash-verified

153}
154
155func TestXSetScan(t *testing.T) {
156 c := getTestConn()
157
158 ctx := context.Background()
159 key := "scan_set"
160 c.Do(ctx, "SADD", key, "a", "b")
161
162 if ay, err := c.Do(ctx, "XSSCAN", key, "").Result(); err != nil {
163 t.Fatal(err)
164 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
165 t.Fatal(len(ay))
166 } else {
167 checkScanValues(t, ay[1], "a", "b")
168 }
169}
170
171func TestSetScan(t *testing.T) {
172 c := getTestConn()

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected