neoneo-go/pkg/consensus/commit_test.go
Evgenii Stratonikov 0036b3e52b random: make use or random package in tests
Also implement Bytes/Fill routines for generating byte slices.
2020-03-27 10:27:46 +03:00

17 lines
309 B
Go

package consensus
import (
"testing"
"github.com/nspcc-dev/neo-go/pkg/internal/random"
"github.com/stretchr/testify/require"
)
func TestCommit_Setters(t *testing.T) {
var sign [signatureSize]byte
random.Fill(sign[:])
var c commit
c.SetSignature(sign[:])
require.Equal(t, sign[:], c.Signature())
}