MCPcopy
hub / github.com/nats-io/nats.go / TestMapStore

Function TestMapStore

internal/syncx/map_test.go:35–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

33}
34
35func TestMapStore(t *testing.T) {
36 var m Map[int, string]
37 m.Store(1, "one")
38
39 v, ok := m.Load(1)
40 if !ok || v != "one" {
41 t.Errorf("Load(1) after Store(1, 'one') = %v, %v; want 'one', true", v, ok)
42 }
43}
44
45func TestMapDelete(t *testing.T) {
46 var m Map[int, string]

Callers

nothing calls this directly

Calls 3

StoreMethod · 0.80
LoadMethod · 0.80
ErrorfMethod · 0.80

Tested by

no test coverage detected