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