69c3e645b6
* changed vm commands to match more of the standard * fixed Uint16 jmp bug in VM * moved test to vm + fixed numnotequal bug * fixed broken tests * moved compiler tests to vm tests * added basic for support + inc and dec stmts * bumped version
18 lines
618 B
Go
18 lines
618 B
Go
package compiler
|
|
|
|
var forTestCases = []testCase{
|
|
{
|
|
"classic for loop",
|
|
`
|
|
package foofor
|
|
func Main() int {
|
|
y := 0
|
|
for i := 0; i < 10; i++ {
|
|
y += 1;
|
|
}
|
|
return y
|
|
}
|
|
`,
|
|
"56c56b006a00527ac4006a53527ac4005a7c6548006a52527ac46a52c3c06a54527ac4616a53c36a54c39f6426006a52c36a53c3c36a51527ac46a53c351936a53527ac46a00c351936a00527ac462d5ff6161616a00c36c75665ec56b6a00527ac46a51527ac46a51c36a00c3946a52527ac46a52c3c56a53527ac4006a54527ac46a00c36a55527ac461616a00c36a51c39f6433006a54c36a55c3936a56527ac46a56c36a53c36a54c37bc46a54c351936a54527ac46a55c36a54c3936a00527ac462c8ff6161616a53c36c7566",
|
|
},
|
|
}
|