linker goes through assemblers, not space

used to traverse all methods in space
now "just" use the passed assemblers, which usually should be compiled and builtin (but for testing . . .)
tests fixed accordingly
This commit is contained in:
Torsten Ruger
2018-07-02 09:37:58 +03:00
parent c6f0dc636d
commit 8952b39446
2 changed files with 25 additions and 31 deletions

View File

@ -25,18 +25,18 @@ module Risc
@linker.position_all
end
def test_positions_set
@machine.object_positions.each do |obj , position|
@linker.object_positions.each do |obj , position|
assert Position.get(obj).valid? , "#{Position.get(obj)} , #{obj.object_id.to_s(16)}"
end
end
end
class TestMachineInit #< MiniTest::Test
class TestMachineInit < MiniTest::Test
def setup
Parfait.boot!
@machine = Risc.machine.boot
@machine.translate(:arm)
@machine.position_all
@machine.create_binary
Risc.boot!
@linker = Mom::MomCompiler.new.translate(:arm)
@linker.position_all
@linker.create_binary
end
def test_pos_cpu
assert_equal 0 , Position.get(@machine.cpu_init).at