(t *testing.T)
| 457 | func (e *testError) foo() {} |
| 458 | |
| 459 | func TestIsInterface(t *testing.T) { |
| 460 | tt := testutils.T{T: t} |
| 461 | base := &testError{msg: "hmm"} |
| 462 | wrapped := pkgErr.Wrap(base, "boom") |
| 463 | |
| 464 | tt.Check(markers.HasInterface(base, (*testErrorInterface)(nil))) |
| 465 | tt.Check(markers.HasInterface(wrapped, (*testErrorInterface)(nil))) |
| 466 | |
| 467 | tt.Check(!markers.HasInterface(base, (*net.Error)(nil))) |
| 468 | tt.Check(!markers.HasInterface(wrapped, (*net.Error)(nil))) |
| 469 | |
| 470 | // nil errors don't contain any interfaces, not even nil. |
| 471 | tt.Check(!markers.HasInterface(nil, (*net.Error)(nil))) |
| 472 | } |
| 473 | |
| 474 | // This test is used in the RFC. |
| 475 | func TestLocalLocalEquivalence(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…