MCPcopy
hub / github.com/tinylib/msgp / TestWrapVanillaErrorWithNoAdditionalContext

Function TestWrapVanillaErrorWithNoAdditionalContext

msgp/errors_test.go:11–23  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestWrapVanillaErrorWithNoAdditionalContext(t *testing.T) {
12 err := errors.New("test")
13 w := WrapError(err)
14 if w == err {
15 t.Fatal()
16 }
17 if w.Error() != err.Error() {
18 t.Fatal()
19 }
20 if w.(errWrapped).Resumable() {
21 t.Fatal()
22 }
23}
24
25func TestWrapVanillaErrorWithAdditionalContext(t *testing.T) {
26 err := errors.New("test")

Callers

nothing calls this directly

Calls 3

WrapErrorFunction · 0.85
ResumableMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…