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

Function TestIntMap_ForEachRead

internal/utils/sync/map_int_test.go:67–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func TestIntMap_ForEachRead(t *testing.T) {
68 var m = syncutils.NewIntMap[int, string]()
69 for i := 0; i < 100; i++ {
70 m.Put(i, "v"+types.String(i))
71 }
72
73 t.Log(m.Len())
74
75 m.ForEachRead(func(k int, v string) {
76 t.Log(k, v)
77 })
78}
79
80func TestIntMap_ForEachWrite(t *testing.T) {
81 var m = syncutils.NewIntMap[int, string]()

Callers

nothing calls this directly

Calls 5

LogMethod · 0.80
ForEachReadMethod · 0.80
PutMethod · 0.45
StringMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected