MCPcopy Create free account
hub / github.com/chanced/caps / TestToLower

Function TestToLower

token/token_test.go:239–252  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

237}
238
239func TestToLower(t *testing.T) {
240 strs := []string{"ABC", "abc", "", "a", "!!", "Abc"}
241
242 for _, str := range strs {
243 t.Run(str, func(t *testing.T) {
244 if token.ToLower(token.DefaultCaser, str) != strings.ToLower(str) {
245 t.Errorf("expected \"%s\" to be %s", str, strings.ToLower(str))
246 }
247 if token.ToLower(token.TurkishCaser, str) != strings.ToLowerSpecial(unicode.TurkishCase, str) {
248 t.Errorf("expected \"%s\" to be %s", str, strings.ToLowerSpecial(unicode.TurkishCase, str))
249 }
250 })
251 }
252}
253
254func TestToUpper(t *testing.T) {
255 strs := []string{"ABC", "abc", "", "a", "!!", "Abc"}

Callers

nothing calls this directly

Calls 3

ToLowerFunction · 0.92
ToLowerSpecialMethod · 0.80
ToLowerMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…