aboutsummaryrefslogtreecommitdiff
path: root/internal/player/skill_abbr_test.go
blob: 81039f0924eecd1ec218e712e650c732f59edd60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)
		}
	}
}