(t *testing.T)
| 1523 | } |
| 1524 | |
| 1525 | func TestErrorContains(t *testing.T) { |
| 1526 | mockT := new(testing.T) |
| 1527 | |
| 1528 | // start with a nil error |
| 1529 | var err error |
| 1530 | False(t, ErrorContains(mockT, err, ""), |
| 1531 | "ErrorContains should return false for nil arg") |
| 1532 | |
| 1533 | // now set an error |
| 1534 | err = errors.New("some error: another error") |
| 1535 | False(t, ErrorContains(mockT, err, "bad error"), |
| 1536 | "ErrorContains should return false for different error string") |
| 1537 | True(t, ErrorContains(mockT, err, "some error"), |
| 1538 | "ErrorContains should return true") |
| 1539 | True(t, ErrorContains(mockT, err, "another error"), |
| 1540 | "ErrorContains should return true") |
| 1541 | } |
| 1542 | |
| 1543 | func Test_isEmpty(t *testing.T) { |
| 1544 |
nothing calls this directly
no test coverage detected
searching dependent graphs…