github.com/algorand/go-algorand-sdk@v1.24.0/abi/abi_test.go (about) 1 package abi 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 ) 8 9 func TestImportWorks(t *testing.T) { 10 // This test is not meant to be exhaustive. It's just a simple test to 11 // verify importing the ABI package from avm-abi is working 12 13 abiType, err := TypeOf("uint64") 14 require.NoError(t, err) 15 16 valueToEncode := 10000 17 expected := []byte{0, 0, 0, 0, 0, 0, 39, 16} 18 19 actual, err := abiType.Encode(valueToEncode) 20 require.NoError(t, err) 21 22 require.Equal(t, expected, actual) 23 }