more TODOs, and especially clarify the situation for input type names
This commit is contained in:
@@ -52,6 +52,28 @@ func TestUpperFirst(t *testing.T) {
|
||||
testStringFunc(t, upperFirst, tests)
|
||||
}
|
||||
|
||||
func TestMatchFirst(t *testing.T) {
|
||||
tests := []struct {
|
||||
name, in, out, match string
|
||||
}{
|
||||
{"Empty", "", "", ""},
|
||||
{"LowerToUpper", "lower", "Lower", "Upper"},
|
||||
{"UpperToUpper", "Upper", "Upper", "Upper"},
|
||||
{"LowerToLower", "lower", "lower", "lower"},
|
||||
{"UpperToLower", "Upper", "upper", "lower"},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
test := test
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
got := matchFirst(test.in, test.match)
|
||||
if got != test.out {
|
||||
t.Errorf("got %#v want %#v", got, test.out)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestGoConstName(t *testing.T) {
|
||||
tests := []test{
|
||||
{"Empty", "", ""},
|
||||
|
||||
Reference in New Issue
Block a user