MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestNewFixedMap

Function TestNewFixedMap

internal/utils/maps/map_fixed_test.go:10–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestNewFixedMap(t *testing.T) {
11 var m = maputils.NewFixedMap[string, int](3)
12 m.Put("a", 1)
13 t.Log(m.RawMap())
14 t.Log(m.Get("a"))
15 t.Log(m.Get("b"))
16
17 m.Put("b", 2)
18 m.Put("c", 3)
19 t.Log(m.RawMap(), m.Keys())
20
21 m.Put("d", 4)
22 t.Log(m.RawMap(), m.Keys())
23
24 m.Put("b", 200)
25 t.Log(m.RawMap(), m.Keys())
26}

Callers

nothing calls this directly

Calls 5

LogMethod · 0.80
RawMapMethod · 0.80
KeysMethod · 0.80
PutMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected