github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/evm/types/proof_test.go (about) 1 package types_test 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 8 "github.com/onflow/flow-go/fvm/evm/testutils" 9 "github.com/onflow/flow-go/fvm/evm/types" 10 ) 11 12 func TestProof(t *testing.T) { 13 proof := testutils.COAOwnershipProofFixture(t) 14 encoded, err := proof.Encode() 15 require.NoError(t, err) 16 17 ret, err := types.COAOwnershipProofFromEncoded(encoded) 18 require.NoError(t, err) 19 require.Equal(t, proof, ret) 20 21 count, err := types.COAOwnershipProofSignatureCountFromEncoded(encoded) 22 require.NoError(t, err) 23 require.Equal(t, 2, count) 24 }