laconicd-deprecated/types/int_test.go
Federico Kunze 5a3d514ba0
conflicts
2021-04-17 12:00:07 +02:00

19 lines
295 B
Go

package types
import (
"math/big"
"testing"
"github.com/stretchr/testify/require"
)
func TestMarshalAndUnmarshalInt(t *testing.T) {
i := big.NewInt(3)
m, err := MarshalBigInt(i)
require.NoError(t, err)
i2, err := UnmarshalBigInt(m)
require.NoError(t, err)
require.Equal(t, i, i2)
}