Files
strom/mc/util/case_test.go
T
2026-08-06 15:43:20 +02:00

30 lines
601 B
Go

package util_test
import (
"testing"
"git.anygate.cloud/anygatecloud/strom/mc/util"
)
func TestCamelCase(t *testing.T) {
tests := []struct {
input string
expected string
}{
{"hello world", "HelloWorld"},
{"test_case", "TestCase"},
{"simple-test", "SimpleTest"},
{"already.Camel", "AlreadyCamel"},
{"UPPER_CASE", "UPPERCASE"},
{"mixed_Case_string", "MixedCaseString"},
{"", ""},
}
for _, test := range tests {
result := util.CamelCase(test.input)
if result != test.expected {
t.Errorf("CamelCase(%q) = %q; expected %q", test.input, result, test.expected)
}
}
}