mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 09:42:22 +00:00
parent
e21015233b
commit
89b5e92b83
1 changed files with 15 additions and 0 deletions
15
pkg/compiler/lambda_test.go
Normal file
15
pkg/compiler/lambda_test.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package compiler_test
|
||||
|
||||
import (
|
||||
"math/big"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFuncLiteral(t *testing.T) {
|
||||
src := `package foo
|
||||
func Main() int {
|
||||
inc := func(x int) int { return x + 1 }
|
||||
return inc(1) + inc(2)
|
||||
}`
|
||||
eval(t, src, big.NewInt(5))
|
||||
}
|
Loading…
Reference in a new issue