Last risc fixes that are not binary, move binary tests

move test that translate or create binary to own directory, 
for semantic distance (they are the only ones still failing)
This commit is contained in:
2020-03-17 11:18:51 +02:00
parent fea98979e8
commit d5411c7727
7 changed files with 7 additions and 7 deletions

View File

@ -0,0 +1,22 @@
require_relative "helper"
module Risc
class TestMachinePos < MiniTest::Test
def setup
code = "class Space; def main(arg);a = 1;return a;end;end"
@linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_binary(code, :arm)
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
def test_one_main
mains = @linker.assemblers.find_all{|asm| asm.callable.name == :main }
assert_equal 1 , mains.length
end
def test_assembler_num
assert_equal 3 , @linker.assemblers.length
end
end
end