(t *testing.T)
| 313 | } |
| 314 | |
| 315 | func TestLowerFirst(t *testing.T) { |
| 316 | tests := []struct { |
| 317 | in string |
| 318 | out string |
| 319 | }{ |
| 320 | {"", ""}, |
| 321 | {"a", "a"}, |
| 322 | {"A", "a"}, |
| 323 | {"abc", "abc"}, |
| 324 | {"Abc", "abc"}, |
| 325 | {"aBc", "aBc"}, |
| 326 | {"aBC", "aBC"}, |
| 327 | {"aBCD", "aBCD"}, |
| 328 | {"ABC", "aBC"}, |
| 329 | {"aBCD", "aBCD"}, |
| 330 | } |
| 331 | for _, test := range tests { |
| 332 | t.Run(test.in, func(t *testing.T) { |
| 333 | if token.LowerFirst(token.DefaultCaser, test.in) != test.out { |
| 334 | t.Errorf("expected %s, got %s", test.out, token.LowerFirst(token.DefaultCaser, test.in)) |
| 335 | } |
| 336 | }) |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | func TestUpperFirst(t *testing.T) { |
| 341 | tests := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…