summaryrefslogtreecommitdiff
path: root/methods_test.go
diff options
context:
space:
mode:
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`},