rubyx/test/risc/test_linker1.rb
Torsten Ruger 56f2742e89 fix code listener logic bug
next's position was only updated initially
previous logic relied on pushing everything long rightly
but it wasn't right, and no harm in setting position twice,
as events only fire if there is real change
2018-07-02 23:03:00 +03:00

18 lines
482 B
Ruby

require_relative "helper"
module Risc
class TestMachinePos < MiniTest::Test
def setup
Parfait.boot!
Risc.boot!
@linker = RubyX::RubyXCompiler.new("class Space; def main(arg);a = 1;return a;end;end").ruby_to_risc(:arm)
@linker.position_all
end
def test_positions_set
@linker.object_positions.each do |obj , position|
assert Position.get(obj).valid? , "#{Position.get(obj)} , #{obj.object_id.to_s(16)}"
end
end
end
end