rubyx/test/risc/test_builder1.rb
Torsten Ruger c9d8f750e5 extend type inference for dsl
and finally test it
2018-08-06 10:11:12 +03:00

21 lines
489 B
Ruby

require_relative "../helper"
module Risc
class TestCompilerBuilder < MiniTest::Test
def setup
Parfait.boot!
Risc.boot!
@init = Parfait.object_space.get_init
@compiler = Risc::MethodCompiler.new( @init )
@builder = @compiler.compiler_builder(@init)
end
def test_inserts_built
r1 = RegisterValue.new(:r1 , :Space)
@builder.build{ space << r1 }
assert_equal Transfer , @compiler.risc_instructions.next.class
end
end
end