compiler/test: add test for inlining with local alias

INITSLOT count should be 1 more than for the same test with global.
This commit is contained in:
Evgeniy Stratonikov 2021-05-19 10:34:44 +03:00
parent b693d54282
commit 87a69b13f1

View file

@ -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) {