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

Function TestMap_LoadOrStoreZeroValue

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

Source from the content-addressed store, hash-verified

136}
137
138func TestMap_LoadOrStoreZeroValue(t *testing.T) {
139 t.Parallel()
140 // The zero value of Map must be usable for LoadOrStore as well.
141 var m Map[string, int]
142 val, loaded := m.LoadOrStore("a", 42)
143 assert.False(t, loaded)
144 assert.Equal(t, 42, val)
145}
146
147func TestMap_LoadOrStoreConcurrent(t *testing.T) {
148 t.Parallel()

Callers

nothing calls this directly

Calls 1

LoadOrStoreMethod · 0.80

Tested by

no test coverage detected