diff options
Diffstat (limited to 'libgo/go/encoding/json/scanner_test.go')
-rw-r--r-- | libgo/go/encoding/json/scanner_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libgo/go/encoding/json/scanner_test.go b/libgo/go/encoding/json/scanner_test.go index a0a5995af8f..14d850865a6 100644 --- a/libgo/go/encoding/json/scanner_test.go +++ b/libgo/go/encoding/json/scanner_test.go @@ -186,11 +186,12 @@ func TestNextValueBig(t *testing.T) { } } +var benchScan scanner + func BenchmarkSkipValue(b *testing.B) { initBig() - var scan scanner for i := 0; i < b.N; i++ { - nextValue(jsonBig, &scan) + nextValue(jsonBig, &benchScan) } b.SetBytes(int64(len(jsonBig))) } |