solana-go/programs/token/MintToChecked_test.go

32 lines
700 B
Go

package token
import (
"bytes"
ag_gofuzz "github.com/gagliardetto/gofuzz"
ag_require "github.com/stretchr/testify/require"
"strconv"
"testing"
)
func TestEncodeDecode_MintToChecked(t *testing.T) {
fu := ag_gofuzz.New().NilChance(0)
for i := 0; i < 1; i++ {
t.Run("MintToChecked"+strconv.Itoa(i), func(t *testing.T) {
{
params := new(MintToChecked)
fu.Fuzz(params)
params.AccountMetaSlice = nil
buf := new(bytes.Buffer)
err := encodeT(*params, buf)
ag_require.NoError(t, err)
//
got := new(MintToChecked)
err = decodeT(got, buf.Bytes())
got.AccountMetaSlice = nil
ag_require.NoError(t, err)
ag_require.Equal(t, params, got)
}
})
}
}