aboutsummaryrefslogtreecommitdiffstats
path: root/common/hexutil/hexutil_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-02-27 02:40:33 +0800
committerFelix Lange <fjl@twurst.com>2017-03-02 21:05:46 +0800
commit280f08be84325924ea7628a8187fd84e7cc39145 (patch)
treec7b5a3c639e5c617004630a0ea98248c3211f5d3 /common/hexutil/hexutil_test.go
parentd304da380382245190f33878363696cd151201a9 (diff)
downloaddexon-280f08be84325924ea7628a8187fd84e7cc39145.tar
dexon-280f08be84325924ea7628a8187fd84e7cc39145.tar.gz
dexon-280f08be84325924ea7628a8187fd84e7cc39145.tar.bz2
dexon-280f08be84325924ea7628a8187fd84e7cc39145.tar.lz
dexon-280f08be84325924ea7628a8187fd84e7cc39145.tar.xz
dexon-280f08be84325924ea7628a8187fd84e7cc39145.tar.zst
dexon-280f08be84325924ea7628a8187fd84e7cc39145.zip
common/hexutil: ensure negative big.Int is encoded sensibly
Restricting encoding is silly.
Diffstat (limited to 'common/hexutil/hexutil_test.go')
-rw-r--r--common/hexutil/hexutil_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/hexutil/hexutil_test.go b/common/hexutil/hexutil_test.go
index 6a92a385c..ed6fccc3c 100644
--- a/common/hexutil/hexutil_test.go
+++ b/common/hexutil/hexutil_test.go
@@ -47,6 +47,7 @@ var (
{referenceBig("ff"), "0xff"},
{referenceBig("112233445566778899aabbccddeeff"), "0x112233445566778899aabbccddeeff"},
{referenceBig("80a7f2c1bcc396c00"), "0x80a7f2c1bcc396c00"},
+ {referenceBig("-80a7f2c1bcc396c00"), "-0x80a7f2c1bcc396c00"},
}
encodeUint64Tests = []marshalTest{