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

Function TestLowerFirst

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

Source from the content-addressed store, hash-verified

313}
314
315func 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
340func TestUpperFirst(t *testing.T) {
341 tests := []struct {

Callers

nothing calls this directly

Calls 1

LowerFirstFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…