mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-02 19:45:50 +00:00
8fe079ec8e
* refactor to use ast.Walk for recursive converting * added lots of test cases * added a new way to handle jump labels * function calls with multiple arguments * binary expression (LOR LAND) * struct types + method receives * cleaner opcode dumps, side by side diff for debugging test cases
26 lines
452 B
Go
26 lines
452 B
Go
package compiler_test
|
|
|
|
var arrayTestCases = []testCase{
|
|
{
|
|
"assign int array",
|
|
`
|
|
package foo
|
|
func Main() []int {
|
|
x := []int{1, 2, 3}
|
|
return x
|
|
}
|
|
`,
|
|
"52c56b53525153c16c766b00527ac46203006c766b00c3616c7566",
|
|
},
|
|
{
|
|
"assign string array",
|
|
`
|
|
package foo
|
|
func Main() []string {
|
|
x := []string{"foo", "bar", "foobar"}
|
|
return x
|
|
}
|
|
`,
|
|
"52c56b06666f6f6261720362617203666f6f53c16c766b00527ac46203006c766b00c3616c7566",
|
|
},
|
|
}
|