mirror of
https://github.com/macocianradu/goboy.git
synced 2026-03-18 21:10:07 +00:00
fixed shiftright test
This commit is contained in:
@@ -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