2018-03-25 18:38:59 +02:00
|
|
|
require_relative "../helper"
|
|
|
|
|
|
|
|
module Risc
|
|
|
|
class TestTranslator < MiniTest::Test
|
|
|
|
|
|
|
|
def setup
|
|
|
|
@machine = Risc.machine.boot
|
|
|
|
@translator = Arm::Translator.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_translate_label
|
|
|
|
label = Parfait.object_space.get_main.risc_instructions
|
|
|
|
assert @translator.translate(label) , label
|
|
|
|
end
|
2018-03-26 18:43:03 +02:00
|
|
|
|
|
|
|
def test_translate_space
|
|
|
|
@assembler = Assembler.new(@machine , Collector.collect_space)
|
|
|
|
assert @machine.translate_arm
|
|
|
|
end
|
2018-03-25 18:38:59 +02:00
|
|
|
end
|
|
|
|
end
|