(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestString_IsEmpty(t *testing.T) { |
| 191 | cases := []struct { |
| 192 | name string |
| 193 | str string |
| 194 | wantEmpty chainResult |
| 195 | }{ |
| 196 | { |
| 197 | name: "empty string", |
| 198 | str: "", |
| 199 | wantEmpty: success, |
| 200 | }, |
| 201 | { |
| 202 | name: "non-empty string", |
| 203 | str: "foo", |
| 204 | wantEmpty: failure, |
| 205 | }, |
| 206 | } |
| 207 | |
| 208 | for _, tc := range cases { |
| 209 | t.Run(tc.name, func(t *testing.T) { |
| 210 | reporter := newMockReporter(t) |
| 211 | |
| 212 | NewString(reporter, tc.str).IsEmpty(). |
| 213 | chain.assert(t, tc.wantEmpty) |
| 214 | |
| 215 | NewString(reporter, tc.str).NotEmpty(). |
| 216 | chain.assert(t, !tc.wantEmpty) |
| 217 | }) |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | func TestString_IsEqual(t *testing.T) { |
| 222 | cases := []struct { |
nothing calls this directly
no test coverage detected
searching dependent graphs…