From 87a69b13f1c17c6a87cd96d73453dc7a48f3501e Mon Sep 17 00:00:00 2001 From: Evgeniy Stratonikov Date: Wed, 19 May 2021 10:34:44 +0300 Subject: [PATCH] compiler/test: add test for inlining with local alias INITSLOT count should be 1 more than for the same test with global. --- pkg/compiler/inline_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/compiler/inline_test.go b/pkg/compiler/inline_test.go index beb84b5b3..46db2cece 100644 --- a/pkg/compiler/inline_test.go +++ b/pkg/compiler/inline_test.go @@ -113,6 +113,11 @@ func TestInline(t *testing.T) { checkCallCount(t, src, 0, 0) eval(t, src, big.NewInt(221)) }) + t.Run("locals, alias", func(t *testing.T) { + src := fmt.Sprintf(srcTmpl, `num := 1; return inline.Concat(num)`) + checkCallCount(t, src, 0, 1) + eval(t, src, big.NewInt(221)) + }) } func TestInlineInLoop(t *testing.T) {