MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / TestToLower

Function TestToLower

search_test.go:107–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestToLower(t *testing.T) {
108 tests := []struct {
109 input string
110 expected string
111 }{
112 {"HELLO", "hello"},
113 {"Hello", "hello"},
114 {"hello", "hello"},
115 {"HeLLo WoRLd", "hello world"},
116 {"123ABC", "123abc"},
117 {"", ""},
118 }
119
120 for _, test := range tests {
121 result := toLower(test.input)
122 if result != test.expected {
123 t.Errorf("toLower(%q) = %q, want %q", test.input, result, test.expected)
124 }
125 }
126}
127
128func TestStringContains(t *testing.T) {
129 tests := []struct {

Callers

nothing calls this directly

Calls 1

toLowerFunction · 0.85

Tested by

no test coverage detected