Execute code between assembly and disassembly
This commit is contained in:
17
test/complex_test.go
Normal file
17
test/complex_test.go
Normal 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)
|
||||
}
|
||||
Reference in New Issue
Block a user