diff --git a/common/hexutil/hexutil_test.go b/common/hexutil/hexutil_test.go index 5c89fa8c9d..24dce185e7 100644 --- a/common/hexutil/hexutil_test.go +++ b/common/hexutil/hexutil_test.go @@ -141,7 +141,7 @@ var ( } hexStringValidityTest = []hexValidityTest{ - {"0x", false}, + {"0x", true}, {"asdcc", false}, {"0x00000102", true}, } @@ -213,9 +213,9 @@ func TestDecodeUint64(t *testing.T) { } } -func TestIsValidHexString(t *testing.T) { +func TestHas0xPrefix(t *testing.T) { for _, test := range hexStringValidityTest { - actual := IsValidHexString(test.input) + actual := Has0xPrefix(test.input) if actual != test.want { t.Errorf("input %s: value mismatch: got %t, want %t", test.input, actual, test.want) } diff --git a/rpc/types_test.go b/rpc/types_test.go index deb761fe2c..5ace764f22 100644 --- a/rpc/types_test.go +++ b/rpc/types_test.go @@ -54,9 +54,9 @@ func TestBlockNumberJSONUnmarshal(t *testing.T) { 18: {``, true, BlockNumber(0)}, 19: {`88439993`, false, BlockNumber(88439993)}, 20: {`-1`, true, BlockNumber(0)}, - 21: {`MaxInt64`, true, BlockNumber(0)}, - 22: {`MinInt64`, true, BlockNumber(0)}, - 23: {`MaxUint64`, true, BlockNumber(0)}, + 21: {`9223372036854775807`, false, BlockNumber(9223372036854775807)}, + 22: {`-9223372036854775808`, true, BlockNumber(0)}, + 23: {`18446744073709551615`, true, BlockNumber(0)}, } for i, test := range tests {