mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
0de949b575
They're useless in a package named 'stackitem', make this package a bit more user-friendly.
21 lines
342 B
Go
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)
|
|
}
|