MCPcopy Create free account
hub / github.com/gobeam/stringy / TestInput_UcFirst

Function TestInput_UcFirst

stringy_test.go:323–353  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

321}
322
323func TestInput_UcFirst(t *testing.T) {
324 tests := []struct {
325 name string
326 arg string
327 want string
328 }{
329 {
330 name: "leading lowercase",
331 arg: "test input",
332 want: "Test input",
333 },
334 {
335 name: "empty string",
336 arg: "",
337 want: "",
338 },
339 {
340 name: "multi-byte leading character",
341 arg: "δδδ",
342 want: "Δδδ",
343 },
344 }
345
346 for _, tt := range tests {
347 t.Run(tt.name, func(t *testing.T) {
348 if got := New(tt.arg).UcFirst(); got != tt.want {
349 t.Errorf("UcFirst(%v) = %v, want %v", tt.arg, got, tt.want)
350 }
351 })
352 }
353}
354
355func TestInput_First(t *testing.T) {
356 fcn := New("4111 1111 1111 1111")

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
UcFirstMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…