(t *testing.T)
| 1507 | } |
| 1508 | |
| 1509 | func TestEqualError(t *testing.T) { |
| 1510 | mockT := new(testing.T) |
| 1511 | |
| 1512 | // start with a nil error |
| 1513 | var err error |
| 1514 | False(t, EqualError(mockT, err, ""), |
| 1515 | "EqualError should return false for nil arg") |
| 1516 | |
| 1517 | // now set an error |
| 1518 | err = errors.New("some error") |
| 1519 | False(t, EqualError(mockT, err, "Not some error"), |
| 1520 | "EqualError should return false for different error string") |
| 1521 | True(t, EqualError(mockT, err, "some error"), |
| 1522 | "EqualError should return true") |
| 1523 | } |
| 1524 | |
| 1525 | func TestErrorContains(t *testing.T) { |
| 1526 | mockT := new(testing.T) |
nothing calls this directly
no test coverage detected
searching dependent graphs…