ceremonyclient/nekryptology/pkg/sharing/v1/polynomial_test.go

30 lines
485 B
Go
Raw Normal View History

2023-07-05 05:32:28 +00:00
//
// Copyright Coinbase, Inc. All Rights Reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
// Copyright Coinbase, Inc. All Rights Reserved.
//
//
// SPDX-License-Identifier: Apache-2.0
//
package v1
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestNewPoly(t *testing.T) {
secret := field.ElementFromBytes([]byte("test"))
poly, err := newPoly(secret, 4)
require.Nil(t, err)
require.NotNil(t, poly)
require.Equal(t, poly.Coefficients[0], secret)
}