| 105 | } |
| 106 | |
| 107 | func 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 | |
| 128 | func TestStringContains(t *testing.T) { |
| 129 | tests := []struct { |