refactor: race index by name

This commit is contained in:
Ilia Denisov
2025-10-02 22:41:04 +03:00
parent 0890bf3009
commit cafdd10bab
10 changed files with 129 additions and 210 deletions
+2 -2
View File
@@ -20,9 +20,9 @@ func TestDeclarePeaceAndWarSingle(t *testing.T) {
assert.Equal(t, mg.RelationWar, r.Relation)
r, err = g().Relation(unknownRaceName, opponentRace) // TODO: test on dead race
assert.ErrorContains(t, err, e.GenericErrorText(e.ErrInputUnknownHostRace))
assert.ErrorContains(t, err, e.GenericErrorText(e.ErrInputUnknownRace))
r, err = g().Relation(hostRace, unknownRaceName) // TODO: test on dead race
assert.ErrorContains(t, err, e.GenericErrorText(e.ErrInputUnknownOpponentRace))
assert.ErrorContains(t, err, e.GenericErrorText(e.ErrInputUnknownRace))
assert.NoError(t, game.DeclarePeace(f, hostRace, opponentRace))
r, err = g().Relation(hostRace, opponentRace)