MCPcopy Index your code
hub / github.com/tinylib/msgp / TestConvertToMarshalError

Function TestConvertToMarshalError

_generated/convert_test.go:48–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestConvertToMarshalError(t *testing.T) {
49 var in, out ConvertErr
50 in = ConvertErr{ConvertErrVal(toFailStr)}
51 b, err := in.MarshalMsg(nil)
52 if err != nil {
53 t.FailNow()
54 }
55
56 _, err = (&out).UnmarshalMsg(b)
57 if msgp.Cause(err) != errConvertTo {
58 t.Fatalf("expected conversion error, found %v", err.Error())
59 }
60}

Callers

nothing calls this directly

Calls 5

CauseFunction · 0.92
ConvertErrValTypeAlias · 0.85
MarshalMsgMethod · 0.65
UnmarshalMsgMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…