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

Function TestConvertFromEncodeError

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

Source from the content-addressed store, hash-verified

8)
9
10func TestConvertFromEncodeError(t *testing.T) {
11 e := ConvertErr{ConvertErrVal(fromFailStr)}
12 var buf bytes.Buffer
13 w := msgp.NewWriter(&buf)
14 err := e.EncodeMsg(w)
15 if msgp.Cause(err) != errConvertFrom {
16 t.Fatalf("expected conversion error, found '%v'", err.Error())
17 }
18}
19
20func TestConvertToEncodeError(t *testing.T) {
21 var in, out ConvertErr

Callers

nothing calls this directly

Calls 5

NewWriterFunction · 0.92
CauseFunction · 0.92
ConvertErrValTypeAlias · 0.85
EncodeMsgMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…