Added more tests
This commit is contained in:
parent
fd64bc6358
commit
e5dd47b5dd
@ -8,10 +8,12 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestX64(t *testing.T) {
|
func TestX64(t *testing.T) {
|
||||||
assert.DeepEqual(t, x64.Call(nil, 1), []byte{0xe8, 0x01, 0x00, 0x00, 0x00})
|
assert.DeepEqual(t, x64.AlignStack(nil), []byte{0x48, 0x83, 0xE4, 0xF0})
|
||||||
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 0, 1), []byte{0xb8, 0x01, 0x00, 0x00, 0x00})
|
assert.DeepEqual(t, x64.Call(nil, 1), []byte{0xE8, 0x01, 0x00, 0x00, 0x00})
|
||||||
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 1, 1), []byte{0xb9, 0x01, 0x00, 0x00, 0x00})
|
assert.DeepEqual(t, x64.CallAtAddress(nil, 1), []byte{0xFF, 0x15, 0x01, 0x00, 0x00, 0x00})
|
||||||
assert.DeepEqual(t, x64.Return(nil), []byte{0xc3})
|
|
||||||
assert.DeepEqual(t, x64.Syscall(nil), []byte{0x0f, 0x05})
|
|
||||||
assert.DeepEqual(t, x64.ExtendRAXToRDX(nil), []byte{0x48, 0x99})
|
assert.DeepEqual(t, x64.ExtendRAXToRDX(nil), []byte{0x48, 0x99})
|
||||||
|
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 0, 1), []byte{0xB8, 0x01, 0x00, 0x00, 0x00})
|
||||||
|
assert.DeepEqual(t, x64.MoveRegisterNumber(nil, 1, 1), []byte{0xB9, 0x01, 0x00, 0x00, 0x00})
|
||||||
|
assert.DeepEqual(t, x64.Return(nil), []byte{0xC3})
|
||||||
|
assert.DeepEqual(t, x64.Syscall(nil), []byte{0x0F, 0x05})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user