Refactored arm package

This commit is contained in:
2025-04-16 17:38:48 +02:00
parent 53ecf40229
commit df725a2b23
26 changed files with 102 additions and 53 deletions

25
src/arm/Call_test.go Normal file
View File

@ -0,0 +1,25 @@
package arm_test
import (
"testing"
"git.urbach.dev/cli/q/src/arm"
"git.urbach.dev/go/assert"
)
func TestCall(t *testing.T) {
usagePatterns := []struct {
Offset int
Code uint32
}{
{0, 0x94000000},
{1, 0x94000001},
{-1, 0x97FFFFFF},
}
for _, pattern := range usagePatterns {
t.Logf("bl %d", pattern.Offset)
code := arm.Call(pattern.Offset)
assert.Equal(t, code, pattern.Code)
}
}