mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
Update json_test.go
This commit is contained in:
parent
c6d750dafc
commit
ad98a9e86b
1 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ func TestUnmarshalBytes(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkUnmarshalBytes(b *testing.B) {
|
func BenchmarkUnmarshalBytes(b *testing.B) {
|
||||||
input := []byte(`"0x123456789abcdef123456789abcdef"`)
|
input := []byte(`"0x123456789abcdef123456789abcdef"`)
|
||||||
for i := 0; i < b.N; i++ {
|
for range b.Loop() {
|
||||||
var v Bytes
|
var v Bytes
|
||||||
if err := v.UnmarshalJSON(input); err != nil {
|
if err := v.UnmarshalJSON(input); err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
|
|
@ -239,7 +239,7 @@ func TestUnmarshalU256(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkUnmarshalBig(b *testing.B) {
|
func BenchmarkUnmarshalBig(b *testing.B) {
|
||||||
input := []byte(`"0x123456789abcdef123456789abcdef"`)
|
input := []byte(`"0x123456789abcdef123456789abcdef"`)
|
||||||
for i := 0; i < b.N; i++ {
|
for range b.Loop() {
|
||||||
var v Big
|
var v Big
|
||||||
if err := v.UnmarshalJSON(input); err != nil {
|
if err := v.UnmarshalJSON(input); err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
|
|
@ -305,7 +305,7 @@ func TestUnmarshalUint64(t *testing.T) {
|
||||||
|
|
||||||
func BenchmarkUnmarshalUint64(b *testing.B) {
|
func BenchmarkUnmarshalUint64(b *testing.B) {
|
||||||
input := []byte(`"0x123456789abcdf"`)
|
input := []byte(`"0x123456789abcdf"`)
|
||||||
for i := 0; i < b.N; i++ {
|
for range b.Loop() {
|
||||||
var v Uint64
|
var v Uint64
|
||||||
v.UnmarshalJSON(input)
|
v.UnmarshalJSON(input)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue