9abda40171
Frequently one needs to check if struct serializes/deserializes properly. This commit implements helpers for such cases including: 1. JSON 2. io.Serializable interface
16 lines
283 B
Go
16 lines
283 B
Go
package state
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/internal/testserdes"
|
|
)
|
|
|
|
func TestEncodeDecodeStorageItem(t *testing.T) {
|
|
storageItem := &StorageItem{
|
|
Value: []byte{},
|
|
IsConst: false,
|
|
}
|
|
|
|
testserdes.EncodeDecodeBinary(t, storageItem, new(StorageItem))
|
|
}
|