(t *testing.T)
| 367 | } |
| 368 | |
| 369 | func TestArray_IsEmpty(t *testing.T) { |
| 370 | cases := []struct { |
| 371 | name string |
| 372 | value []interface{} |
| 373 | wantEmpty chainResult |
| 374 | }{ |
| 375 | { |
| 376 | name: "empty slice", |
| 377 | value: []interface{}{}, |
| 378 | wantEmpty: success, |
| 379 | }, |
| 380 | { |
| 381 | name: "one empty element", |
| 382 | value: []interface{}{""}, |
| 383 | wantEmpty: failure, |
| 384 | }, |
| 385 | } |
| 386 | |
| 387 | for _, tc := range cases { |
| 388 | t.Run(tc.name, func(t *testing.T) { |
| 389 | reporter := newMockReporter(t) |
| 390 | |
| 391 | NewArray(reporter, tc.value).IsEmpty(). |
| 392 | chain.assert(t, tc.wantEmpty) |
| 393 | |
| 394 | NewArray(reporter, tc.value).NotEmpty(). |
| 395 | chain.assert(t, !tc.wantEmpty) |
| 396 | }) |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | func TestArray_IsEqual(t *testing.T) { |
| 401 | t.Run("basic", func(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…