(t *testing.T)
| 25 | |
| 26 | } |
| 27 | func TestErrorIs(t *testing.T) { |
| 28 | testErr := errors.New("is") |
| 29 | err := &Error{Err: fmt.Errorf("this is: %w", testErr)} |
| 30 | if expected, got := true, errors.Is(err, testErr); expected != got { |
| 31 | t.Fatalf("expected %v but got %v", expected, got) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // errorString is a trivial implementation of error. |
| 36 | type errorString struct { |