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
31 lines
521 B
Go
31 lines
521 B
Go
package compiler_test
|
|
|
|
var assignTestCases = []testCase{
|
|
{
|
|
"chain define",
|
|
`
|
|
package foo
|
|
func Main() int {
|
|
x := 4
|
|
y := x
|
|
z := y
|
|
foo := z
|
|
bar := foo
|
|
return bar
|
|
}
|
|
`,
|
|
"56c56b546c766b00527ac46c766b00c36c766b51527ac46c766b51c36c766b52527ac46c766b52c36c766b53527ac46c766b53c36c766b54527ac46203006c766b54c3616c7566",
|
|
},
|
|
{
|
|
"simple assign",
|
|
`
|
|
package foo
|
|
func Main() int {
|
|
x := 4
|
|
x = 8
|
|
return x
|
|
}
|
|
`,
|
|
"53c56b546c766b00527ac4586c766b00527ac46203006c766b00c3616c7566",
|
|
},
|
|
}
|