(t *testing.T)
| 115 | } |
| 116 | |
| 117 | func TestIsStartCase(t *testing.T) { |
| 118 | for _, tc := range []struct { |
| 119 | in string |
| 120 | want bool |
| 121 | }{ |
| 122 | {"", true}, |
| 123 | {"Feat", true}, |
| 124 | {"My Feature", true}, |
| 125 | {"Add New Endpoint", true}, |
| 126 | {"my feature", false}, // first word lowercase |
| 127 | {"My feature", false}, // second word lowercase |
| 128 | {"MY FEATURE", true}, // all-uppercase still starts uppercase per word |
| 129 | } { |
| 130 | got := casing.IsStartCase(tc.in) |
| 131 | if got != tc.want { |
| 132 | t.Errorf("IsStartCase(%q) = %v, want %v", tc.in, got, tc.want) |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | func TestCheck_AllFormats(t *testing.T) { |
| 138 | for _, tc := range []struct { |
nothing calls this directly
no test coverage detected