fix the gapping of instructions

so last binary stays empty and new starts at 8
This commit is contained in:
Torsten Ruger
2018-06-06 01:16:00 +03:00
parent 4ab6d62acf
commit 4789b63fcb
4 changed files with 19 additions and 20 deletions

View File

@ -23,6 +23,7 @@ module Risc
assert_raises {InstructionListener.init(nil , @binary)}
end
def test_listener_method
@position.set(8)
listener = InstructionListener.new( @instruction , @binary )
listener.position_changed(@position)
end

View File

@ -10,6 +10,9 @@ module Risc
def test_new
assert @pos
end
def test_invalid
assert !@pos.valid?
end
def test_next_slot
mov = Arm::ArmMachine.mov(:r1 , :r1)
position = Position.new(mov , 0)