Execute code between assembly and disassembly

This commit is contained in:
Ian Gulliver
2021-11-20 10:23:54 -10:00
parent 3ced099a47
commit 51f318c924
2 changed files with 14 additions and 0 deletions

17
test/complex_test.go Normal file
View File

@@ -0,0 +1,17 @@
package test
import "testing"
func TestLoop(t *testing.T) {
state := assembleAndExecute(t, `
functions:
- - [add, f0, 1]
- [call, +1]
- [ltu, f0, 3]
- [jmpt, -3]
- - [add, g0, 1]
`)
expectGlobalMemory(t, state, 0, 3)
}