mirror of
https://github.com/macocianradu/goboy.git
synced 2026-03-18 21:10:07 +00:00
26 lines
385 B
Go
26 lines
385 B
Go
package operations
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestReadLowerByte(t *testing.T) {
|
|
SP := uint16(0x1234)
|
|
|
|
actual := GetLowerByte(SP)
|
|
|
|
if actual != 0x34 {
|
|
t.Errorf("actual %v != expected %v", actual, true)
|
|
}
|
|
}
|
|
|
|
func TestReadUpperByte(t *testing.T) {
|
|
SP := uint16(0x1234)
|
|
|
|
actual := GetHigherByte(SP)
|
|
|
|
if actual != 0x12 {
|
|
t.Errorf("actual %v != expected %v", actual, true)
|
|
}
|
|
}
|