MCPcopy
hub / github.com/pocketbase/pocketbase / TestUcFirst

Function TestUcFirst

tools/inflector/inflector_test.go:10–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestUcFirst(t *testing.T) {
11 scenarios := []struct {
12 val string
13 expected string
14 }{
15 {"", ""},
16 {" ", " "},
17 {"Test", "Test"},
18 {"test", "Test"},
19 {"test test2", "Test test2"},
20 }
21
22 for i, s := range scenarios {
23 t.Run(fmt.Sprintf("%d_%#v", i, s.val), func(t *testing.T) {
24 result := inflector.UcFirst(s.val)
25 if result != s.expected {
26 t.Fatalf("Expected %q, got %q", s.expected, result)
27 }
28 })
29 }
30}
31
32func TestColumnify(t *testing.T) {
33 scenarios := []struct {

Callers

nothing calls this directly

Calls 2

UcFirstFunction · 0.92
RunMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…