neoneo-go/pkg/vm/compiler/tests/builtin_test.go
Anthony De Meulemeester 34bd9d31ac
Compiler arrays (#49)
* implemented operation and param flags in the cli invoke cmd.

* reverted prev changes and added debug flag for compiling.

* change transactionType variable to Type, for package convention

* index support for arrays.

* implemented builtin (len) for the compiler.

* bumped version -> 0.35.0

* updated compiler README and changed invoke to testinvoke.
2018-03-25 18:21:00 +02:00

17 lines
263 B
Go

package compiler
var builtinTestCases = []testCase{
{
"array len",
`
package foo
func Main() int {
x := []int{0, 1, 2}
y := len(x)
return y
}
`,
"53c56b52510053c16c766b00527ac46c766b00c361c06c766b51527ac46203006c766b51c3616c7566",
},
}