github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/accounts/abi/numbers_test.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 19:16:31</date> 10 //</624450062268764160> 11 12 13 package abi 14 15 import ( 16 "bytes" 17 "math/big" 18 "testing" 19 ) 20 21 func TestNumberTypes(t *testing.T) { 22 ubytes := make([]byte, 32) 23 ubytes[31] = 1 24 25 unsigned := U256(big.NewInt(1)) 26 if !bytes.Equal(unsigned, ubytes) { 27 t.Errorf("expected %x got %x", ubytes, unsigned) 28 } 29 } 30