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

Function TestErrorCtxAsTupleUnmarshal

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

Source from the content-addressed store, hash-verified

151}
152
153func TestErrorCtxAsTupleUnmarshal(t *testing.T) {
154 bts := marshalErrorCtx(fillErrorCtxAsTuple())
155 cnt := countStrings(bts)
156
157 var as []string
158 for i := 0; i < cnt; i++ {
159 dodgeBts := dodgifyMsgpString(bts, i)
160
161 var ec ErrorCtxAsTuple
162 _, err := (&ec).UnmarshalMsg(dodgeBts)
163 as = append(as, err.Error())
164 }
165
166 ok, a, b := diffstrs(as, expectedAsTuple())
167 if !ok {
168 t.Fatal(a, b)
169 }
170}
171
172func TestErrorCtxAsTupleDecode(t *testing.T) {
173 bts := marshalErrorCtx(fillErrorCtxAsTuple())

Callers

nothing calls this directly

Calls 8

marshalErrorCtxFunction · 0.85
fillErrorCtxAsTupleFunction · 0.85
countStringsFunction · 0.85
dodgifyMsgpStringFunction · 0.85
diffstrsFunction · 0.85
expectedAsTupleFunction · 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…