MCPcopy
hub / github.com/aceld/zinx / TestCount

Function TestCount

zutils/shard_lock_map_test.go:91–101  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

89}
90
91func TestCount(t *testing.T) {
92 slm := NewShardLockMaps()
93 for i := 0; i < 100; i++ {
94 slm.Set(strconv.Itoa(i), TestUser{strconv.Itoa(i)})
95 }
96
97 if slm.Count() != 100 {
98 t.Error("Expecting 100 element within map.")
99 }
100
101}
102
103func TestRemove(t *testing.T) {
104 slm := NewShardLockMaps()

Callers

nothing calls this directly

Calls 4

SetMethod · 0.95
CountMethod · 0.95
NewShardLockMapsFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected