test that register allocation allocates risc names

This commit is contained in:
Torsten 2020-03-22 18:01:51 +02:00
parent bc60f02f66
commit 1970a3ee6e
1 changed files with 8 additions and 1 deletions

View File

@ -10,12 +10,19 @@ module Risc
end
def test_init
@compiler.risc_instructions.each do |ins|
puts ins.to_s
ins.register_names.each do |name|
assert ! RegisterValue.look_like_reg(name)
end
end
end
def test_1
@compiler.translate_method( @platform , [])
@compiler.risc_instructions.each do |ins|
ins.register_names.each do |name|
assert RegisterValue.look_like_reg(name)
end
end
end
end
end