Skip to content

Commit 10ee659

Browse files
committed
Add Premier League tests
1 parent 40e1c3f commit 10ee659

1 file changed

Lines changed: 169 additions & 0 deletions

File tree

‎munsell_test.go‎

Lines changed: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,172 @@ func TestMatchFromHexShorthand(t *testing.T) {
105105
t.Errorf("Expected Red, received %v", color)
106106
}
107107
}
108+
109+
/* Test Premier League teams colors */
110+
func testPremierLeague(t *testing.T, inputColor string, expectedColor munsell.Color) {
111+
color, err := munsell.GetColorFromHex(inputColor)
112+
if err != nil {
113+
t.Errorf("Expected color, received %v", err)
114+
}
115+
if color != expectedColor {
116+
t.Errorf("Expected %s, received %v", expectedColor.String(), color)
117+
}
118+
}
119+
func TestPremierLeague_Arsenal(t *testing.T) {
120+
testPremierLeague(t, "#EF0107", munsell.Red)
121+
}
122+
func TestPremierLeague_ArsenalAlt(t *testing.T) {
123+
testPremierLeague(t, "#fbf2b0", munsell.Yellow)
124+
}
125+
126+
func TestPremierLeague_Aston(t *testing.T) {
127+
testPremierLeague(t, "#7A003C", munsell.Purple) // FIXME:
128+
}
129+
130+
func TestPremierLeague_AstonAlt(t *testing.T) {
131+
testPremierLeague(t, "#ffffff", munsell.White)
132+
}
133+
134+
func TestPremierLeague_Brentford(t *testing.T) {
135+
testPremierLeague(t, "#f42727", munsell.Red)
136+
}
137+
138+
func TestPremierLeague_BrentfordAlt(t *testing.T) {
139+
testPremierLeague(t, "#ffff00", munsell.Yellow)
140+
}
141+
142+
func TestPremierLeague_Brighton(t *testing.T) {
143+
testPremierLeague(t, "#0000ff", munsell.Blue)
144+
}
145+
146+
func TestPremierLeague_BrightonAlt(t *testing.T) {
147+
testPremierLeague(t, "#39c3cd", munsell.LightBlue)
148+
}
149+
150+
func TestPremierLeague_Burnley(t *testing.T) {
151+
testPremierLeague(t, "#53162F", munsell.Purple) // FIXME:
152+
}
153+
154+
func TestPremierLeague_BurnleyAlt(t *testing.T) {
155+
testPremierLeague(t, "#ffffff", munsell.White)
156+
}
157+
158+
func TestPremierLeague_Chelsea(t *testing.T) {
159+
testPremierLeague(t, "#0054cd", munsell.Blue) // FIXME:
160+
}
161+
162+
func TestPremierLeague_ChelseaAlt(t *testing.T) {
163+
testPremierLeague(t, "#ffff00", munsell.Yellow)
164+
}
165+
166+
func TestPremierLeague_CrystalPalace(t *testing.T) {
167+
testPremierLeague(t, "#0202fb", munsell.Blue)
168+
}
169+
170+
func TestPremierLeague_CrystalPalaceAlt(t *testing.T) {
171+
testPremierLeague(t, "#ffde00", munsell.Yellow)
172+
}
173+
174+
func TestPremierLeague_Everton(t *testing.T) {
175+
testPremierLeague(t, "#0000ff", munsell.Blue)
176+
}
177+
178+
func TestPremierLeague_EvertonAlt(t *testing.T) {
179+
testPremierLeague(t, "#231F20", munsell.Black)
180+
}
181+
182+
func TestPremierLeague_Leeds(t *testing.T) {
183+
testPremierLeague(t, "#ffffff", munsell.White)
184+
}
185+
186+
func TestPremierLeague_LeedsAlt(t *testing.T) {
187+
testPremierLeague(t, "#081d54", munsell.Blue)
188+
}
189+
190+
func TestPremierLeague_Leicester(t *testing.T) {
191+
testPremierLeague(t, "#0202fb", munsell.Blue)
192+
}
193+
194+
func TestPremierLeague_LeicesterAlt(t *testing.T) {
195+
testPremierLeague(t, "#bfe5e6", munsell.LightBlue)
196+
}
197+
198+
func TestPremierLeague_Liverpool(t *testing.T) {
199+
testPremierLeague(t, "#D00027", munsell.Red)
200+
}
201+
202+
func TestPremierLeague_LiverpoolAlt(t *testing.T) {
203+
testPremierLeague(t, "#ece2d9", munsell.White)
204+
}
205+
206+
func TestPremierLeague_ManchesterCity(t *testing.T) {
207+
testPremierLeague(t, "#61acdf", munsell.LightBlue)
208+
}
209+
210+
func TestPremierLeague_ManchesterCityAlt(t *testing.T) {
211+
testPremierLeague(t, "#ffffff", munsell.White)
212+
}
213+
214+
func TestPremierLeague_ManchesterUnited(t *testing.T) {
215+
testPremierLeague(t, "#DA020E", munsell.Red)
216+
}
217+
218+
func TestPremierLeague_ManchesterUnitedAlt(t *testing.T) {
219+
testPremierLeague(t, "#b7ddff", munsell.LightBlue)
220+
}
221+
222+
func TestPremierLeague_Newcastle(t *testing.T) {
223+
testPremierLeague(t, "#231F20", munsell.Black)
224+
}
225+
226+
func TestPremierLeague_NewcastleAlt(t *testing.T) {
227+
testPremierLeague(t, "#2e4b60", munsell.Blue)
228+
}
229+
230+
func TestPremierLeague_Norwich(t *testing.T) {
231+
testPremierLeague(t, "#ffff00", munsell.Yellow)
232+
}
233+
234+
func TestPremierLeague_NorwichAlt(t *testing.T) {
235+
testPremierLeague(t, "#081d54", munsell.Blue)
236+
}
237+
238+
func TestPremierLeague_Southampton(t *testing.T) {
239+
testPremierLeague(t, "#ED1A3B", munsell.Red)
240+
}
241+
242+
func TestPremierLeague_SouthamptonAlt(t *testing.T) {
243+
testPremierLeague(t, "#ffff00", munsell.Yellow)
244+
}
245+
246+
func TestPremierLeague_Tottenham(t *testing.T) {
247+
testPremierLeague(t, "#ffffff", munsell.White)
248+
}
249+
250+
func TestPremierLeague_TottenhamAlt(t *testing.T) {
251+
testPremierLeague(t, "#231F20", munsell.Black)
252+
}
253+
254+
func TestPremierLeague_Watford(t *testing.T) {
255+
testPremierLeague(t, "#ffff00", munsell.Yellow)
256+
}
257+
258+
func TestPremierLeague_WatfordAlt(t *testing.T) {
259+
testPremierLeague(t, "#ffffff", munsell.White)
260+
}
261+
262+
func TestPremierLeague_WestHam(t *testing.T) {
263+
testPremierLeague(t, "#7A003C", munsell.Purple) // FIXME:
264+
}
265+
266+
func TestPremierLeague_WestHamAlt(t *testing.T) {
267+
testPremierLeague(t, "#b7ddff", munsell.LightBlue)
268+
}
269+
270+
func TestPremierLeague_Wolverhampton(t *testing.T) {
271+
testPremierLeague(t, "#F7AA25", munsell.Yellow)
272+
}
273+
274+
func TestPremierLeague_WolverhamptonAlt(t *testing.T) {
275+
testPremierLeague(t, "#2e4b60", munsell.Blue)
276+
}

0 commit comments

Comments
 (0)