-
Notifications
You must be signed in to change notification settings - Fork 0
/
cases_test.go
81 lines (79 loc) · 1.8 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package isogram
// Source: exercism/problem-specifications
// Commit: d137db1 Format using prettier (#1917)
var testCases = []struct {
description string
input string
expected bool
}{
{
description: "empty string",
input: "",
expected: true,
},
{
description: "isogram with only lower case characters",
input: "isogram",
expected: true,
},
{
description: "word with one duplicated character",
input: "eleven",
expected: false,
},
{
description: "word with one duplicated character from the end of the alphabet",
input: "zzyzx",
expected: false,
},
{
description: "longest reported english isogram",
input: "subdermatoglyphic",
expected: true,
},
{
description: "word with duplicated character in mixed case",
input: "Alphabet",
expected: false,
},
{
description: "word with duplicated character in mixed case, lowercase first",
input: "alphAbet",
expected: false,
},
{
description: "hypothetical isogrammic word with hyphen",
input: "thumbscrew-japingly",
expected: true,
},
{
description: "hypothetical word with duplicated character following hyphen",
input: "thumbscrew-jappingly",
expected: false,
},
{
description: "isogram with duplicated hyphen",
input: "six-year-old",
expected: true,
},
{
description: "made-up name that is an isogram",
input: "Emily Jung Schwartzkopf",
expected: true,
},
{
description: "duplicated character in the middle",
input: "accentor",
expected: false,
},
{
description: "same first and last characters",
input: "angola",
expected: false,
},
{
description: "word with duplicated character and with two hyphens",
input: "up-to-date",
expected: false,
},
}