From 2eab743a5bff044b3982195288c197e86ca0148e Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 28 Nov 2023 10:51:03 +0300 Subject: [PATCH] compiler: add compatibility test for storage limits Signed-off-by: Anna Shaleva --- pkg/compiler/native_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/compiler/native_test.go b/pkg/compiler/native_test.go index 8daf8b6b4..ba0add4e4 100644 --- a/pkg/compiler/native_test.go +++ b/pkg/compiler/native_test.go @@ -11,6 +11,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/compiler" "github.com/nspcc-dev/neo-go/pkg/config" + "github.com/nspcc-dev/neo-go/pkg/config/limits" "github.com/nspcc-dev/neo-go/pkg/core/interop" "github.com/nspcc-dev/neo-go/pkg/core/native" "github.com/nspcc-dev/neo-go/pkg/core/native/noderoles" @@ -25,6 +26,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/interop/native/policy" "github.com/nspcc-dev/neo-go/pkg/interop/native/roles" "github.com/nspcc-dev/neo-go/pkg/interop/native/std" + "github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/smartcontract" "github.com/nspcc-dev/neo-go/pkg/smartcontract/nef" "github.com/nspcc-dev/neo-go/pkg/vm" @@ -131,6 +133,11 @@ func TestPolicyAttributeType(t *testing.T) { require.EqualValues(t, policy.NotaryAssistedT, transaction.NotaryAssistedT) } +func TestStorageLimits(t *testing.T) { + require.EqualValues(t, storage.MaxKeyLen, limits.MaxStorageKeyLen) + require.EqualValues(t, storage.MaxValueLen, limits.MaxStorageValueLen) +} + type nativeTestCase struct { method string params []string