neo-go/pkg/vm/stackitem/serialization_test.go
Roman Khimov 0de949b575 stackitem: remove Item/StackItem from function names
They're useless in a package named 'stackitem', make this package a bit more
user-friendly.
2021-07-06 19:56:23 +03:00

21 lines
342 B
Go

package stackitem
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestSerializationMaxErr(t *testing.T) {
base := make([]byte, MaxSize/2+1)
item := Make(base)
arr := []Item{item, item.Dup()}
aitem := Make(arr)
_, err := Serialize(item)
require.NoError(t, err)
_, err = Serialize(aitem)
require.Error(t, err)
}