(t *testing.T)
| 13 | } |
| 14 | |
| 15 | func 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 | |
| 26 | func TestSyncMap_GetEx(t *testing.T) { |
| 27 | sm := MakeSyncMap[int]() |