You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: codec_test.go
    path of file: ./repos/ethermint/x/evm/types
    
    the code of the file until where you have to start completion: package types

import (
	"testing"

	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	"github.com/stretchr/testify/require"
)

type caseAny struct {
	name    string
	any     *codectypes.Any
	expPass bool
}

func TestPackTxData(t *testing.T) {
	testCases := []struct {
		name    string
		txData  TxData
		expPass bool
	}{
		{
			"access list tx",
			&AccessListTx{},
			true,
		},
		{
			"legacy tx",
			&LegacyTx{},
			true,
		},
		{
			"nil",
			nil,
			false,
		}
    
func TestPackTxData(t *testing.T) {
	testCases := []struct {
		name    string
		txData  TxData
		expPass bool
	}{
		{
			"access list tx",
			&AccessListTx{},
			true,
		},
		{
			"legacy tx",
			&LegacyTx{},
			true,
		},
		{
			"nil",
			nil,
			false,
		},
	}

	testCasesAny := []caseAny{}

	for _, tc := range testCases {
		txDataAny, err := PackTxData(tc.txData)
		if tc.expPass {
			require.NoError(t, err, tc.name)
		} else {
			require.Error(t, err, tc.name)
		}

		testCasesAny = append(testCasesAny, caseAny{tc.name, txDataAny, tc.expPass})
	}

	for i, tc := range testCasesAny {
		cs, err := UnpackTxData(tc.any)
		if tc.expPass {
			require.NoError(t, err, tc.name)
			require.Equal(t, testCases[i].txData, cs, tc.name)
		} else {
			require.Error(t, err, tc.name)
		}
	}
}