diff options
Diffstat (limited to 'names_test.go')
| -rw-r--r-- | names_test.go | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/names_test.go b/names_test.go index 0cc97a0..ad8ba05 100644 --- a/names_test.go +++ b/names_test.go @@ -93,7 +93,34 @@ func TestLength(t *testing.T) { for _, test := range tests { actual := length(test.s) if test.expected != actual { - t.Errorf("Expected: %d, actual: %d", test.expected, actual) + t.Errorf("%s, expected: %d, actual: %d", test.s, + test.expected, actual) + } + } +} + +func TestIsLower(t *testing.T) { + tests := []struct { + s string + expected bool + }{ + {"", false}, + {"abc", true}, + {"Abc", false}, + {"a{bc}", true}, + {"A{bc}", false}, + {"{a}A", false}, + {"{A}a", true}, + {"{\\i B}A", true}, + {"{\\AA a}a", false}, + {"{abc}A", false}, + {"{Abc}a", true}, + } + for _, test := range tests { + actual := isLower(test.s) + if test.expected != actual { + t.Errorf("%s, expected: %t, actual: %t", test.s, + test.expected, actual) } } } |
