github.com/neatio-net/neatio@v1.7.3-0.20231114194659-f4d7a2226baa/chain/accounts/abi/numbers_test.go (about) 1 package abi 2 3 import ( 4 "bytes" 5 "math/big" 6 "testing" 7 ) 8 9 func TestNumberTypes(t *testing.T) { 10 ubytes := make([]byte, 32) 11 ubytes[31] = 1 12 13 unsigned := U256(big.NewInt(1)) 14 if !bytes.Equal(unsigned, ubytes) { 15 t.Errorf("expected %x got %x", ubytes, unsigned) 16 } 17 }