MCPcopy Index your code
hub / github.com/rilldata/rill / TestToPascalCase

Function TestToPascalCase

runtime/parser/parse_api_test.go:178–199  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func TestToPascalCase(t *testing.T) {
179 tests := []struct {
180 name string
181 input string
182 expected string
183 }{
184 {"empty", "", ""},
185 {"single word", "hello", "Hello"},
186 {"multiple words", "hello world", "HelloWorld"},
187 {"with underscores", "hello_world", "HelloWorld"},
188 {"with dashes", "hello-world", "HelloWorld"},
189 }
190
191 for _, test := range tests {
192 t.Run(test.name, func(t *testing.T) {
193 result := toPascalCase(test.input)
194 if result != test.expected {
195 t.Errorf("expected %s, got %s", test.expected, result)
196 }
197 })
198 }
199}

Callers

nothing calls this directly

Calls 3

toPascalCaseFunction · 0.85
ErrorfMethod · 0.65
RunMethod · 0.45

Tested by

no test coverage detected