MCPcopy Create free account
hub / github.com/kataras/iris / TestErrorIs

Function TestErrorIs

core/errgroup/errgroup_test.go:27–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25
26}
27func 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.
36type errorString struct {

Callers

nothing calls this directly

Calls 4

NewMethod · 0.80
ErrorfMethod · 0.80
FatalfMethod · 0.80
IsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…