mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
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:
parent
b693d54282
commit
87a69b13f1
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ func TestInline(t *testing.T) {
|
||||||
checkCallCount(t, src, 0, 0)
|
checkCallCount(t, src, 0, 0)
|
||||||
eval(t, src, big.NewInt(221))
|
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) {
|
func TestInlineInLoop(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue