(t *testing.T)
| 34 | } |
| 35 | |
| 36 | func TestCharacterIndex_AddOverwrite(t *testing.T) { |
| 37 | ci := freshCharacterIndex() |
| 38 | ci.Add("Aldric", 10) |
| 39 | ci.Add("Aldric", 20) |
| 40 | |
| 41 | userId, found := ci.Find("Aldric") |
| 42 | if !found || userId != 20 { |
| 43 | t.Fatalf("expected overwritten userId 20, got (%d, %v)", userId, found) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestCharacterIndex_AddIdempotent(t *testing.T) { |
| 48 | ci := freshCharacterIndex() |
nothing calls this directly
no test coverage detected