(t *testing.T)
| 1694 | } |
| 1695 | |
| 1696 | func TestEqualError(t *testing.T) { |
| 1697 | t.Parallel() |
| 1698 | |
| 1699 | mockT := new(testing.T) |
| 1700 | |
| 1701 | // start with a nil error |
| 1702 | var err error |
| 1703 | False(t, EqualError(mockT, err, ""), |
| 1704 | "EqualError should return false for nil arg") |
| 1705 | |
| 1706 | // now set an error |
| 1707 | err = errors.New("some error") |
| 1708 | False(t, EqualError(mockT, err, "Not some error"), |
| 1709 | "EqualError should return false for different error string") |
| 1710 | True(t, EqualError(mockT, err, "some error"), |
| 1711 | "EqualError should return true") |
| 1712 | } |
| 1713 | |
| 1714 | func TestErrorContains(t *testing.T) { |
| 1715 | t.Parallel() |
nothing calls this directly
no test coverage detected