mirror of
https://github.com/luxfi/utxo.git
synced 2026-10-30 15:13:57 +00:00
Drop redundant fx/ directory since packages already have fx suffix: - github.com/luxfi/utxo/fx/secp256k1fx → github.com/luxfi/utxo/secp256k1fx - github.com/luxfi/utxo/fx/nftfx → github.com/luxfi/utxo/nftfx - github.com/luxfi/utxo/fx/propertyfx → github.com/luxfi/utxo/propertyfx BREAKING CHANGE: Import paths changed
55 lines
1.0 KiB
Go
55 lines
1.0 KiB
Go
// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package secp256k1fx
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/luxfi/ids"
|
|
)
|
|
|
|
func TestMintOutputVerify(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
out *MintOutput
|
|
expectedErr error
|
|
}{
|
|
{
|
|
name: "nil",
|
|
out: nil,
|
|
expectedErr: ErrNilOutput,
|
|
},
|
|
{
|
|
name: "invalid output owners",
|
|
out: &MintOutput{
|
|
OutputOwners: OutputOwners{
|
|
Threshold: 2,
|
|
Addrs: []ids.ShortID{ids.GenerateTestShortID()},
|
|
},
|
|
},
|
|
expectedErr: ErrOutputUnspendable,
|
|
},
|
|
{
|
|
name: "passes verification",
|
|
out: &MintOutput{
|
|
OutputOwners: OutputOwners{
|
|
Threshold: 1,
|
|
Addrs: []ids.ShortID{ids.GenerateTestShortID()},
|
|
},
|
|
},
|
|
expectedErr: nil,
|
|
},
|
|
}
|
|
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
require := require.New(t)
|
|
err := tt.out.Verify()
|
|
require.ErrorIs(err, tt.expectedErr)
|
|
})
|
|
}
|
|
}
|