MCPcopy
hub / github.com/wavetermdev/waveterm / TestSyncMap_Get

Function TestSyncMap_Get

pkg/util/ds/syncmap_test.go:15–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13}
14
15func TestSyncMap_Get(t *testing.T) {
16 sm := MakeSyncMap[int]()
17 sm.Set("key1", 1)
18 if sm.Get("key1") != 1 {
19 t.Errorf("expected 1, got %d", sm.Get("key1"))
20 }
21 if sm.Get("key2") != 0 {
22 t.Errorf("expected 0, got %d", sm.Get("key2"))
23 }
24}
25
26func TestSyncMap_GetEx(t *testing.T) {
27 sm := MakeSyncMap[int]()

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected