(t *testing.T)
| 290 | } |
| 291 | |
| 292 | func TestUpperFirstLowerRest(t *testing.T) { |
| 293 | tests := []struct { |
| 294 | in string |
| 295 | out string |
| 296 | }{ |
| 297 | {"", ""}, |
| 298 | {"a", "A"}, |
| 299 | {"A", "A"}, |
| 300 | {"abc", "Abc"}, |
| 301 | {"Abc", "Abc"}, |
| 302 | {"aBc", "Abc"}, |
| 303 | {"aBC", "Abc"}, |
| 304 | {"aBCD", "Abcd"}, |
| 305 | } |
| 306 | for _, test := range tests { |
| 307 | t.Run(test.in, func(t *testing.T) { |
| 308 | if token.UpperFirstLowerRest(token.DefaultCaser, test.in) != test.out { |
| 309 | t.Errorf("expected %s, got %s", test.out, token.UpperFirstLowerRest(token.DefaultCaser, test.in)) |
| 310 | } |
| 311 | }) |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | func TestLowerFirst(t *testing.T) { |
| 316 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…