Skip to content

Commit

Permalink
add label to for loop test
Browse files Browse the repository at this point in the history
  • Loading branch information
bobertlo committed Nov 17, 2024
1 parent 64c2e90 commit ad90998
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,14 @@ func TestCompileDoubleForLoop(t *testing.T) {
config := ConfigNOP94()

input := `
org start
dat 123, 123
i for 3
j for 2
dat i, j
rof
rof
dat 123, 123
start dat 123, 123
`

w, err := CompileWarrior(strings.NewReader(input), config)
Expand All @@ -170,4 +171,5 @@ func TestCompileDoubleForLoop(t *testing.T) {
{Op: DAT, OpMode: F, AMode: DIRECT, A: 3, BMode: DIRECT, B: 2},
{Op: DAT, OpMode: F, AMode: DIRECT, A: 123, BMode: DIRECT, B: 123},
}, w.Code)
assert.Equal(t, 7, w.Start)
}

0 comments on commit ad90998

Please sign in to comment.