2020-08-03 12:00:27 +00:00
|
|
|
package native
|
|
|
|
|
|
|
|
import (
|
|
|
|
"math/big"
|
|
|
|
"testing"
|
|
|
|
|
2021-07-17 15:37:33 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/internal/testserdes"
|
2020-08-03 12:00:27 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestCandidate_Bytes(t *testing.T) {
|
|
|
|
expected := &candidate{
|
|
|
|
Registered: true,
|
|
|
|
Votes: *big.NewInt(0x0F),
|
|
|
|
}
|
2021-07-17 15:37:33 +00:00
|
|
|
actual := new(candidate)
|
|
|
|
testserdes.ToFromStackItem(t, expected, actual)
|
2020-08-03 12:00:27 +00:00
|
|
|
}
|