(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func TestIntMap_ForEachWrite(t *testing.T) { |
| 81 | var m = syncutils.NewIntMap[int, string]() |
| 82 | for i := 0; i < 100; i++ { |
| 83 | m.Put(i, "v"+types.String(i)) |
| 84 | } |
| 85 | |
| 86 | t.Log(m.Len()) |
| 87 | |
| 88 | m.ForEachRead(func(k int, v string) { |
| 89 | t.Log(k, v) |
| 90 | m.DeleteUnsafe(k) |
| 91 | }) |
| 92 | t.Log(m.Len(), "elements left") |
| 93 | } |
| 94 | |
| 95 | func BenchmarkNewIntMap(b *testing.B) { |
| 96 | var m = syncutils.NewIntMap[int, *stats.BandwidthStat]() |
nothing calls this directly
no test coverage detected