-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcases_test.go
58 lines (55 loc) · 1.24 KB
/
cases_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package acronym
// Source: exercism/problem-specifications
// Commit: 5fc501b Remove unneeded nesting (#1798)
type acronymTest struct {
description string
input string
expected string
}
var testCases = []acronymTest{
{
description: "basic",
input: "Portable Network Graphics",
expected: "PNG",
},
{
description: "lowercase words",
input: "Ruby on Rails",
expected: "ROR",
},
{
description: "punctuation",
input: "First In, First Out",
expected: "FIFO",
},
{
description: "all caps word",
input: "GNU Image Manipulation Program",
expected: "GIMP",
},
{
description: "punctuation without whitespace",
input: "Complementary metal-oxide semiconductor",
expected: "CMOS",
},
{
description: "very long abbreviation",
input: "Rolling On The Floor Laughing So Hard That My Dogs Came Over And Licked Me",
expected: "ROTFLSHTMDCOALM",
},
{
description: "consecutive delimiters",
input: "Something - I made up from thin air",
expected: "SIMUFTA",
},
{
description: "apostrophes",
input: "Halley's Comet",
expected: "HC",
},
{
description: "underscore emphasis",
input: "The Road _Not_ Taken",
expected: "TRNT",
},
}