mirror of
https://github.com/macocianradu/goboy.git
synced 2026-03-18 13:00:07 +00:00
fixed shiftright test
This commit is contained in:
@@ -2,7 +2,6 @@ package cpu
|
||||
|
||||
import (
|
||||
"radu.macocian.me/goboy/cpu/operations"
|
||||
"radu.macocian.me/goboy/memory"
|
||||
)
|
||||
|
||||
type op_context struct {
|
||||
|
||||
@@ -12,18 +12,18 @@ func TestShiftLeft(t *testing.T) {
|
||||
actual := r1
|
||||
|
||||
if actual != expected {
|
||||
t.Errorf("actual %x != expected %x", actual, expected)
|
||||
t.Errorf("actual %08b != expected %08b", actual, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestShiftRight(t *testing.T) {
|
||||
r1 := byte(0b01010101)
|
||||
ShiftLeft(&r1)
|
||||
ShiftRight(&r1)
|
||||
|
||||
expected := byte(0b00101010)
|
||||
actual := r1
|
||||
|
||||
if actual != expected {
|
||||
t.Errorf("actual %x != expected %x", actual, expected)
|
||||
t.Errorf("actual %08b != expected %08b", actual, expected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user