MCPcopy Index your code
hub / github.com/aceld/zinx / TestKeys

Function TestKeys

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

Source from the content-addressed store, hash-verified

345}
346
347func TestKeys(t *testing.T) {
348 slm := NewShardLockMaps()
349
350 for i := 0; i < 100; i++ {
351 slm.Set(strconv.Itoa(i), TestUser{strconv.Itoa(i)})
352 }
353
354 keys := slm.Keys()
355 if len(keys) != 100 {
356 t.Error("We should have counted 100 elements.")
357 }
358}
359
360func TestFnv32(t *testing.T) {
361 key := []byte("ABC")

Callers

nothing calls this directly

Calls 4

SetMethod · 0.95
KeysMethod · 0.95
NewShardLockMapsFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected