MCPcopy Create free account
hub / github.com/chanced/caps / TestUpperFirstLowerRest

Function TestUpperFirstLowerRest

token/token_test.go:292–313  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

290}
291
292func 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
315func TestLowerFirst(t *testing.T) {
316 tests := []struct {

Callers

nothing calls this directly

Calls 1

UpperFirstLowerRestFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…