Permalink
Browse files

cpu: Fixes CPU test cases. The CPu has recently been changed to

return an io.EOF error when it ran out of code. The test cases
were not updated to reflect this change. Consequently they failed.
  • Loading branch information...
1 parent a363154 commit 4b78a6e78e2e8a4dd7dc3fb36971a17d26661d62 @jteeuwen committed Nov 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 cpu/cpu_test.go
View
4 cpu/cpu_test.go
@@ -5,6 +5,7 @@ package cpu
import (
"fmt"
+ "io"
"testing"
)
@@ -39,7 +40,8 @@ func doTest(t *testing.T, c *CPU, result, overflow Word) {
s := c.Store
s.A, s.EX = 0, 0
- if err := c.Run(0); err != nil {
+ err := c.Run(0)
+ if err != nil && err != io.EOF {
t.Fatal(err)
}

0 comments on commit 4b78a6e

Please sign in to comment.