MCPcopy Create free account
hub / github.com/Code-Hex/pget / TestErrors

Function TestErrors

error_test.go:9–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestErrors(t *testing.T) {
10 err := errors.New("first")
11 err = errors.Wrap(err, "second")
12 err = errors.Wrap(err, "third")
13
14 err = errTop(err)
15 if err.Error() != "first" {
16 t.Errorf("could not get top message")
17 }
18}

Callers

nothing calls this directly

Calls 2

errTopFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected