MCPcopy Index your code
hub / github.com/docker/docker-agent / TestMap_Length

Function TestMap_Length

pkg/concurrent/map_test.go:58–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

56}
57
58func TestMap_Length(t *testing.T) {
59 t.Parallel()
60 m := NewMap[string, int]()
61 assert.Equal(t, 0, m.Length())
62
63 m.Store("a", 1)
64 m.Store("b", 2)
65 m.Store("c", 3)
66 assert.Equal(t, 3, m.Length())
67}
68
69func TestMap_Range(t *testing.T) {
70 t.Parallel()

Callers

nothing calls this directly

Calls 3

NewMapFunction · 0.85
LengthMethod · 0.45
StoreMethod · 0.45

Tested by

no test coverage detected