First part of int allocation

implemented allocate_int
instead of add_new_int
This commit is contained in:
Torsten Ruger
2018-11-21 11:12:39 +02:00
parent 5015a11108
commit bbb7dbef75
7 changed files with 98 additions and 12 deletions

View File

@ -28,6 +28,11 @@ module Risc
def test_not_alloc_space
assert_raises {@builder.space}
end
def test_reset
assert_equal :r1 , @builder.integer!.symbol
@builder.reset_names
assert_equal :r1 , @builder.integer!.symbol # would raise if it existed
end
def test_next_message
reg = @builder.next_message!
assert_equal :r1 , reg.symbol