(t *testing.T)
| 1623 | } |
| 1624 | |
| 1625 | func TestEqualError(t *testing.T) { |
| 1626 | mockT := new(testing.T) |
| 1627 | |
| 1628 | // start with a nil error |
| 1629 | var err error |
| 1630 | False(t, EqualError(mockT, err, ""), |
| 1631 | "EqualError should return false for nil arg") |
| 1632 | |
| 1633 | // now set an error |
| 1634 | err = errors.New("some error") |
| 1635 | False(t, EqualError(mockT, err, "Not some error"), |
| 1636 | "EqualError should return false for different error string") |
| 1637 | True(t, EqualError(mockT, err, "some error"), |
| 1638 | "EqualError should return true") |
| 1639 | } |
| 1640 | |
| 1641 | func TestErrorContains(t *testing.T) { |
| 1642 | mockT := new(testing.T) |
nothing calls this directly
no test coverage detected