github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/hex/hex_test.go (about) 1 package hex 2 3 import ( 4 "math" 5 "math/big" 6 "testing" 7 8 "github.com/stretchr/testify/assert" 9 ) 10 11 func TestEncodeDecodeBig(t *testing.T) { 12 b := big.NewInt(math.MaxInt64) 13 e := EncodeBig(b) 14 d := DecodeBig(e) 15 assert.Equal(t, b.Uint64(), d.Uint64()) 16 }