wip: decoder errors

This commit is contained in:
Thomas Pelletier
2021-03-30 19:52:02 -04:00
parent bcd5333b03
commit 18d45c446b
4 changed files with 43 additions and 8 deletions
+4 -1
View File
@@ -136,7 +136,10 @@ before `, "highlighted", ``},
doc := b.Bytes()
hl := doc[start:end]
err := decodeErrorFromHighlight(doc, hl, e.msg)
err := wrapDecodeError(doc, &decodeError{
highlight: hl,
message: e.msg,
})
derr := err.(*DecodeError)
assert.Equal(t, strings.Trim(e.expected, "\n"), derr.String())
})