This commit is contained in:
parent
bac5986425
commit
3ae47f93eb
45 changed files with 1417 additions and 0 deletions
25
src/arm/Call_test.go
Normal file
25
src/arm/Call_test.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue