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

Function TestSetScan

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

Source from the content-addressed store, hash-verified

169}
170
171func TestSetScan(t *testing.T) {
172 c := getTestConn()
173
174 ctx := context.Background()
175 key := "scan_set"
176 c.Do(ctx, "SADD", key, "a", "b")
177
178 if ay, err := c.Do(ctx, "SSCAN", key, "0").Result(); err != nil {
179 t.Fatal(err)
180 } else if ay, ok := ay.([]interface{}); !ok || len(ay) != 2 {
181 t.Fatal(len(ay))
182 } else {
183 checkScanValues(t, ay[1], "a", "b")
184 }
185}
186
187func TestXZSetScan(t *testing.T) {
188 c := getTestConn()

Callers

nothing calls this directly

Calls 3

getTestConnFunction · 0.85
checkScanValuesFunction · 0.85
DoMethod · 0.45

Tested by

no test coverage detected