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

Function TestErrorCtxAsMapUnmarshal

_generated/errorwrap_test.go:114–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

112}
113
114func TestErrorCtxAsMapUnmarshal(t *testing.T) {
115 bts := marshalErrorCtx(fillErrorCtxAsMap())
116 cnt := countStrings(bts)
117
118 var as []string
119 for i := 0; i < cnt; i++ {
120 dodgeBts := dodgifyMsgpString(bts, i)
121
122 var ec ErrorCtxAsMap
123 _, err := (&ec).UnmarshalMsg(dodgeBts)
124 as = append(as, err.Error())
125 }
126
127 ok, a, b := diffstrs(as, expectedAsMap())
128 if !ok {
129 t.Fatal(a, b)
130 }
131}
132
133func TestErrorCtxAsMapDecode(t *testing.T) {
134 bts := marshalErrorCtx(fillErrorCtxAsMap())

Callers

nothing calls this directly

Calls 8

marshalErrorCtxFunction · 0.85
fillErrorCtxAsMapFunction · 0.85
countStringsFunction · 0.85
dodgifyMsgpStringFunction · 0.85
diffstrsFunction · 0.85
expectedAsMapFunction · 0.85
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…