Added more tests
This commit is contained in:
parent
c4d763839a
commit
f4b0020c49
12 changed files with 205 additions and 39 deletions
|
@ -6,14 +6,14 @@ func Jump8(code []byte, offset int8) []byte {
|
|||
return append(code, 0xEB, byte(offset))
|
||||
}
|
||||
|
||||
// JumpIfLess jumps if the result was less.
|
||||
func Jump8IfLess(code []byte, offset int8) []byte {
|
||||
return append(code, 0x7C, byte(offset))
|
||||
// JumpIfEqual jumps if the result was equal.
|
||||
func Jump8IfEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x74, byte(offset))
|
||||
}
|
||||
|
||||
// JumpIfLessOrEqual jumps if the result was less or equal.
|
||||
func Jump8IfLessOrEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x7E, byte(offset))
|
||||
// JumpIfNotEqual jumps if the result was not equal.
|
||||
func Jump8IfNotEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x75, byte(offset))
|
||||
}
|
||||
|
||||
// JumpIfGreater jumps if the result was greater.
|
||||
|
@ -26,12 +26,12 @@ func Jump8IfGreaterOrEqual(code []byte, offset int8) []byte {
|
|||
return append(code, 0x7D, byte(offset))
|
||||
}
|
||||
|
||||
// JumpIfEqual jumps if the result was equal.
|
||||
func Jump8IfEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x74, byte(offset))
|
||||
// JumpIfLess jumps if the result was less.
|
||||
func Jump8IfLess(code []byte, offset int8) []byte {
|
||||
return append(code, 0x7C, byte(offset))
|
||||
}
|
||||
|
||||
// JumpIfNotEqual jumps if the result was not equal.
|
||||
func Jump8IfNotEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x75, byte(offset))
|
||||
// JumpIfLessOrEqual jumps if the result was less or equal.
|
||||
func Jump8IfLessOrEqual(code []byte, offset int8) []byte {
|
||||
return append(code, 0x7E, byte(offset))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue