MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / TestLowerTitle

Function TestLowerTitle

internal/codegen/sdk/utils_test.go:7–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5)
6
7func TestLowerTitle(t *testing.T) {
8
9 // empty
10 if LowerTitle("") != "" {
11 t.Fatal("expected empty title to remain empty")
12 }
13
14 // all lowercase
15 if LowerTitle("lowercase") != "lowercase" {
16 t.Fatal("expected no changes when input is all lowercase")
17 }
18
19 // all uppercase
20 if LowerTitle("UPPERCASE") != "uPPERCASE" {
21 t.Fatal("expected first rune to be lower when input is all uppercase")
22 }
23
24 // Title Case
25 if LowerTitle("Title Case") != "title Case" {
26 t.Fatal("expected first rune to be lower when input is Title Case")
27 }
28}

Callers

nothing calls this directly

Calls 1

LowerTitleFunction · 0.85

Tested by

no test coverage detected