use common list for risc instruction

strange that that was not done before as the code was clearly copied
when extracting it

Fix bug for insertion
This commit is contained in:
Torsten Ruger
2018-03-18 10:36:01 +05:30
parent 9c052c78a7
commit c5ec532616
3 changed files with 29 additions and 60 deletions

View File

@ -36,6 +36,11 @@ module Risc
@instruction.insert @branch
assert_equal @branch, @instruction.last
end
def test_insert_two
@branch << @label
@instruction.insert @branch
assert_equal @label , @instruction.last
end
def test_append_not_empty
@instruction.append @branch
@instruction.append @label