package strcase import ( "testing" ) func TestToCamel(t *testing.T) { cases := [][]string{ {"foo-bar", "fooBar"}, {"TestCase", "testCase"}, {"", ""}, {"AnyKind of_string", "anyKindOfString"}, } for _, i := range cases { in := i[0] out := i[1] result := ToCamel(in) if result != out { t.Error("'" + result + "' != '" + out + "'") } } }