7 func TestInitialism(t *testing.T) {
13 {name: "id", input: "id", expOutput: "ID"},
14 {name: "ipv6", input: "is_ipv6", expOutput: "IsIPv6"},
15 {name: "ip6", input: "is_ip6", expOutput: "IsIP6"},
17 for _, test := range tests {
18 t.Run(test.name, func(t *testing.T) {
19 output := camelCaseName(test.input)
20 if output != test.expOutput {
21 t.Errorf("expected %q, got %q", test.expOutput, output)