summaryrefslogtreecommitdiff
path: root/methods_test.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-02-25 20:42:37 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2023-02-25 20:42:37 -0700
commit0fa9f8b14f04f4b0099f038cc43e4cef57a155a1 (patch)
tree62a21db8d3241bcf264bcf0874df632c4ce9ba94 /methods_test.go
parent03778c094d995791f6c3df08afeeb792f33f35a5 (diff)
parent22edcf6a68a057ed04368d5f78c8ba3ddfee8d57 (diff)
Merge branch 'lukeshu/fuzz-err'
Diffstat (limited to 'methods_test.go')
-rw-r--r--methods_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/methods_test.go b/methods_test.go
index 64af28c..23a6c4f 100644
--- a/methods_test.go
+++ b/methods_test.go
@@ -304,8 +304,8 @@ func TestMethodsDecode(t *testing.T) {
testcases := map[string]testcase{
"decode-basic": {In: `{}`, Obj: &tstDecoder{n: 2}},
"decode-basic-eof": {In: `{}`, Obj: &tstDecoder{n: 5}},
- "decode-syntax-error": {In: `{x}`, Obj: &tstDecoder{n: 5}, ExpectedErr: `json: v: syntax error at input byte 1: object: unexpected character: 'x'`},
- "unmarshal-syntax-error": {In: `{x}`, Obj: &strUnmarshaler{}, ExpectedErr: `json: v: syntax error at input byte 1: object: unexpected character: 'x'`},
+ "decode-syntax-error": {In: `{x}`, Obj: &tstDecoder{n: 5}, ExpectedErr: `json: v: syntax error at input byte 1: invalid character 'x' looking for beginning of object key string`},
+ "unmarshal-syntax-error": {In: `{x}`, Obj: &strUnmarshaler{}, ExpectedErr: `json: v: syntax error at input byte 1: invalid character 'x' looking for beginning of object key string`},
"decode-short": {In: `{}`, Obj: &tstDecoder{n: 1}, ExpectedErr: `json: v: cannot decode JSON object at input byte 0 into Go *lowmemjson_test.tstDecoder: did not consume entire object`},
"decode-err": {In: `{}`, Obj: &tstDecoder{err: "xxx"}, ExpectedErr: `json: v: cannot decode JSON object at input byte 0 into Go *lowmemjson_test.tstDecoder: xxx`},
"decode-err2": {In: `{}`, Obj: &tstDecoder{n: 1, err: "yyy"}, ExpectedErr: `json: v: cannot decode JSON object at input byte 0 into Go *lowmemjson_test.tstDecoder: yyy`},