Files
subcoding/test/complex_test.go

18 lines
231 B
Go
Raw Normal View History

2021-11-18 19:35:24 -10:00
package test
2021-11-18 17:43:13 -10:00
import "testing"
2021-11-18 19:35:24 -10:00
func TestLoop(t *testing.T) {
2021-11-18 20:12:35 -10:00
state := assembleAndExecute(t, `
2021-11-18 17:43:13 -10:00
functions:
- - [add, f0, 1]
- [call, +1]
- [ltu, f0, 3]
- [jmpt, -3]
- - [add, g0, 1]
`)
2021-11-18 17:53:38 -10:00
2021-11-18 20:12:35 -10:00
expectGlobalMemory(t, state, 0, 3)
2021-11-18 17:43:13 -10:00
}