(t *testing.T)
| 170 | } |
| 171 | |
| 172 | func TestErrorCtxAsTupleDecode(t *testing.T) { |
| 173 | bts := marshalErrorCtx(fillErrorCtxAsTuple()) |
| 174 | cnt := countStrings(bts) |
| 175 | |
| 176 | var as []string |
| 177 | for i := 0; i < cnt; i++ { |
| 178 | dodgeBts := dodgifyMsgpString(bts, i) |
| 179 | |
| 180 | r := msgp.NewReader(bytes.NewReader(dodgeBts)) |
| 181 | var ec ErrorCtxAsTuple |
| 182 | err := (&ec).DecodeMsg(r) |
| 183 | as = append(as, err.Error()) |
| 184 | } |
| 185 | |
| 186 | ok, a, b := diffstrs(as, expectedAsTuple()) |
| 187 | if !ok { |
| 188 | t.Fatal(a, b) |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | func diffstrs(a, b []string) (ok bool, as, bs []string) { |
| 193 | ma := map[string]bool{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…