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

Function TestHashLen

IceFireDB-PubSub/test/cmd_hash_test.go:319–337  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

317}
318
319func TestHashLen(t *testing.T) {
320 server.Clear()
321
322 c, err := proto.Dial(server.Addr())
323 ok(t, err)
324 defer c.Close()
325 mustOK(t, c, "HMSET", "wim",
326 "gijs", "lam",
327 "kees", "bok",
328 "teun", "vuur",
329 "zus", "jet")
330 mustDo(t, c, "HLEN", "wim", proto.Int(4))
331
332 must0(t, c, "HLEN", "nosuch")
333
334 // Wrong key type
335 directDoString(t, c, "SET", "foo", "bar")
336 mustDo(t, c, "HLEN", "foo", proto.Error(msgWrongType))
337}
338
339func TestHashMget(t *testing.T) {
340 server.Clear()

Callers

nothing calls this directly

Calls 11

ClearFunction · 0.92
DialFunction · 0.92
AddrFunction · 0.92
IntFunction · 0.92
ErrorFunction · 0.92
okFunction · 0.70
mustOKFunction · 0.70
mustDoFunction · 0.70
must0Function · 0.70
directDoStringFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected