(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestIntMap_PutCompact(t *testing.T) { |
| 53 | var a = assert.NewAssertion(t) |
| 54 | |
| 55 | var m = syncutils.NewIntMap[int, string]() |
| 56 | m.Put(1, "a") |
| 57 | m.Put(1, "b") |
| 58 | a.IsTrue(m.Get(1) == "b") |
| 59 | |
| 60 | m.PutCompact(1, "c", func(oldV string, newV string) string { |
| 61 | return oldV + newV |
| 62 | }) |
| 63 | |
| 64 | a.IsTrue(m.Get(1) == "bc") |
| 65 | } |
| 66 | |
| 67 | func TestIntMap_ForEachRead(t *testing.T) { |
| 68 | var m = syncutils.NewIntMap[int, string]() |
nothing calls this directly
no test coverage detected