github.com/neatlab/neatio@v1.7.3-0.20220425043230-d903e92fcc75/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  }