(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func 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 | } |
nothing calls this directly
no test coverage detected