aboutsummaryrefslogtreecommitdiffstats
path: root/common/hexutil/json_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/hexutil/json_test.go')
-rw-r--r--common/hexutil/json_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/hexutil/json_test.go b/common/hexutil/json_test.go
index 290bf9ca2..c7fde0adb 100644
--- a/common/hexutil/json_test.go
+++ b/common/hexutil/json_test.go
@@ -130,6 +130,10 @@ var unmarshalBigTests = []unmarshalTest{
{input: `"0x01"`, wantErr: ErrLeadingZero},
{input: `"0xx"`, wantErr: ErrSyntax},
{input: `"0x1zz01"`, wantErr: ErrSyntax},
+ {
+ input: `"0x10000000000000000000000000000000000000000000000000000000000000000"`,
+ wantErr: ErrBig256Range,
+ },
// valid encoding
{input: `""`, want: big.NewInt(0)},
@@ -148,6 +152,10 @@ var unmarshalBigTests = []unmarshalTest{
input: `"0xffffffffffffffffffffffffffffffffffff"`,
want: referenceBig("ffffffffffffffffffffffffffffffffffff"),
},
+ {
+ input: `"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"`,
+ want: referenceBig("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),
+ },
}
func TestUnmarshalBig(t *testing.T) {