diff options
Diffstat (limited to 'internal/player/skill_abbr_test.go')
| -rw-r--r-- | internal/player/skill_abbr_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/internal/player/skill_abbr_test.go b/internal/player/skill_abbr_test.go new file mode 100644 index 0000000..81039f0 --- /dev/null +++ b/internal/player/skill_abbr_test.go @@ -0,0 +1,19 @@ +package player + +import "testing" + +// Every skill must have an abbreviation. A missing entry silently renders as an +// empty XP drop and an empty column in the skills display, with no error, so +// this must fail loudly when a skill is added without its abbreviation. +func TestEverySkillHasAbbreviation(t *testing.T) { + for _, skill := range AllSkills { + if SkillAbbr[skill] == "" { + t.Errorf("skill %q has no abbreviation", skill) + } + } + for skill := range SkillAbbr { + if !ValidSkill(skill) { + t.Errorf("SkillAbbr contains unknown skill %q", skill) + } + } +} |
