make the interpreter platform

but still using the risc_instruction stream
This commit is contained in:
Torsten Ruger
2018-05-17 09:31:36 +03:00
parent 07ed16d765
commit 49c4d170ce
9 changed files with 131 additions and 20 deletions

View File

@ -3,23 +3,14 @@ require_relative "../helper"
module Risc
class TestPlaform < MiniTest::Test
def test_factory_exists
def test_arm_factory_exists
assert Platform.for("Arm")
end
def test_inter_factory_exists
assert Platform.for("Interpreter")
end
def test_factory_raise
assert_raises{ Platform.for("NotArm")}
end
def test_platform_class
arm = Platform.for("Arm")
assert_equal Arm::ArmPlatform , arm.class
end
def test_platform_translator_class
arm = Platform.for("Arm")
assert_equal Arm::Translator , arm.translator.class
end
def test_platform_loaded_class
arm = Platform.for("Arm")
assert_equal Fixnum , arm.loaded_at.class
end
end
end