add register names to allocator
make platform instantiate it basic plumbing
This commit is contained in:
@ -12,5 +12,9 @@ module Risc
|
||||
def test_factory_raise
|
||||
assert_raises{ Platform.for("NotArm")}
|
||||
end
|
||||
def test_allocate
|
||||
allocator = Platform.new.allocator(FakeCompiler.new)
|
||||
assert_equal FakeCompiler , allocator.compiler.class
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -16,6 +16,9 @@ module Risc
|
||||
def test_empty
|
||||
assert @allocator.used_regs_empty?
|
||||
end
|
||||
def test_reg_names
|
||||
assert_equal 16 , @allocator.reg_names.length
|
||||
end
|
||||
def test_compiler
|
||||
assert_equal CallableCompiler , @allocator.compiler.class
|
||||
assert_equal :fake_name , @allocator.compiler.callable.name
|
||||
|
Reference in New Issue
Block a user