fix unit test
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Sid 2020-10-12 17:22:36 +01:00
parent 2c01f9e603
commit 0bd4180b85

View File

@ -22,7 +22,7 @@ func slicesEqual(x, y []byte) bool {
func TestCreateCPU(t *testing.T) {
prog := []byte{1, 2, 3, 4}
newCPU := NewCHIP8(prog)
if !slicesEqual(newCPU.memory[200:204], prog) {
if !slicesEqual(newCPU.memory[0x200:0x204], prog) {
t.Errorf("CPU not initalized properly")
}
}