more TODOs, and especially clarify the situation for input type names

This commit is contained in:
Ben Kraft
2021-03-22 18:45:52 -07:00
parent 088ec53ad5
commit 17a95fd4de
10 changed files with 115 additions and 22 deletions
+22
View File
@@ -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", "", ""},