github.com/ava-labs/avalanchego@v1.11.11/vms/propertyfx/burn_operation_test.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package propertyfx
     5  
     6  import (
     7  	"testing"
     8  
     9  	"github.com/stretchr/testify/require"
    10  
    11  	"github.com/ava-labs/avalanchego/vms/components/verify"
    12  	"github.com/ava-labs/avalanchego/vms/secp256k1fx"
    13  )
    14  
    15  func TestBurnOperationInvalid(t *testing.T) {
    16  	op := BurnOperation{Input: secp256k1fx.Input{
    17  		SigIndices: []uint32{1, 0},
    18  	}}
    19  	err := op.Verify()
    20  	require.ErrorIs(t, err, secp256k1fx.ErrInputIndicesNotSortedUnique)
    21  }
    22  
    23  func TestBurnOperationNumberOfOutput(t *testing.T) {
    24  	op := BurnOperation{}
    25  	require.Empty(t, op.Outs())
    26  }
    27  
    28  func TestBurnOperationState(t *testing.T) {
    29  	intf := interface{}(&BurnOperation{})
    30  	_, ok := intf.(verify.State)
    31  	require.False(t, ok)
    32  }