diff options
Diffstat (limited to 'src/encoding/json/bench_test.go')
| -rw-r--r-- | src/encoding/json/bench_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/encoding/json/bench_test.go b/src/encoding/json/bench_test.go index 29dbc26d41..709e048a53 100644 --- a/src/encoding/json/bench_test.go +++ b/src/encoding/json/bench_test.go @@ -187,3 +187,14 @@ func BenchmarkUnmarshalInt64(b *testing.B) { } } } + +func BenchmarkIssue10335(b *testing.B) { + b.ReportAllocs() + var s struct{} + j := []byte(`{"a":{ }}`) + for n := 0; n < b.N; n++ { + if err := Unmarshal(j, &s); err != nil { + b.Fatal(err) + } + } +} |
