-
Notifications
You must be signed in to change notification settings - Fork 0
/
cases_test.go
61 lines (59 loc) · 1.46 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
package pangram
// Source: exercism/problem-specifications
// Commit: fc50648 Pangram: check case insensitive behavior (#1660)
var testCases = []struct {
description string
input string
expected bool
}{
{
description: "empty sentence",
input: "",
expected: false,
},
{
description: "perfect lower case",
input: "abcdefghijklmnopqrstuvwxyz",
expected: true,
},
{
description: "only lower case",
input: "the quick brown fox jumps over the lazy dog",
expected: true,
},
{
description: "missing the letter 'x'",
input: "a quick movement of the enemy will jeopardize five gunboats",
expected: false,
},
{
description: "missing the letter 'h'",
input: "five boxing wizards jump quickly at it",
expected: false,
},
{
description: "with underscores",
input: "the_quick_brown_fox_jumps_over_the_lazy_dog",
expected: true,
},
{
description: "with numbers",
input: "the 1 quick brown fox jumps over the 2 lazy dogs",
expected: true,
},
{
description: "missing letters replaced by numbers",
input: "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog",
expected: false,
},
{
description: "mixed case and punctuation",
input: "\"Five quacking Zephyrs jolt my wax bed.\"",
expected: true,
},
{
description: "a-m and A-M are 26 different characters but not a pangram",
input: "abcdefghijklm ABCDEFGHIJKLM",
expected: false,
},
}