fix all tests for previous commit
This commit is contained in:
@ -29,7 +29,7 @@ module Risc
|
||||
end
|
||||
def produce_instructions
|
||||
assert @expect , "No output given"
|
||||
linker = RubyX::RubyXCompiler.new.ruby_to_risc(as_test_main,:interpreter)
|
||||
linker = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_risc(as_test_main,:interpreter)
|
||||
compiler = linker.assemblers.find{|c| c.callable.name == :main and c.callable.self_type.object_class.name == :Test}
|
||||
compiler.instructions
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ module Mom
|
||||
|
||||
class TestSlotDefinitionConstant < MiniTest::Test
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@compiler = Risc::FakeCompiler.new
|
||||
@definition = SlotDefinition.new(StringConstant.new("hi") , [])
|
||||
@register = @definition.to_register(@compiler , InstructionMock.new)
|
||||
|
@ -3,7 +3,7 @@ require_relative "helper"
|
||||
module Mom
|
||||
class TestSlotDefinitionKnown1 < MiniTest::Test
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@compiler = Risc::FakeCompiler.new
|
||||
@definition = SlotDefinition.new(:message , :caller)
|
||||
@register = @definition.to_register(@compiler , "fake source")
|
||||
|
@ -3,7 +3,7 @@ require_relative "helper"
|
||||
module Mom
|
||||
class TestSlotDefinitionKnown2 < MiniTest::Test
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@compiler = Risc::FakeCompiler.new
|
||||
@definition = SlotDefinition.new(:message , [:caller , :type])
|
||||
@register = @definition.to_register(@compiler , InstructionMock.new)
|
||||
|
@ -4,7 +4,7 @@ module Mom
|
||||
class TestSlotLoad1 < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
load = SlotLoad.new( [:message, :caller] , [:message,:type] )
|
||||
@compiler = Risc::FakeCompiler.new
|
||||
load.to_risc(@compiler)
|
||||
|
@ -4,7 +4,7 @@ module Mom
|
||||
class TestSlotLoad2 < MiniTest::Test
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@compiler = Risc::FakeCompiler.new
|
||||
load = SlotLoad.new( [:message, :caller, :type] , [:message, :caller , :type] )
|
||||
load.to_risc(@compiler)
|
||||
|
@ -6,7 +6,7 @@ module Vool
|
||||
include MomCompile
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@ret = compile_mom( as_test_main("self.main {|elem| elem = 5 } "))
|
||||
end
|
||||
def test_is_compiler
|
||||
@ -22,7 +22,7 @@ module Vool
|
||||
class TestBlockLocal < MiniTest::Test
|
||||
include MomCompile
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@ret = compile_mom( as_test_main("self.main {|elem| local = 5 } "))
|
||||
@block = @ret.method_compilers.first.get_method.blocks
|
||||
end
|
||||
@ -43,7 +43,7 @@ module Vool
|
||||
include MomCompile
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
end
|
||||
def test_method_arg_compiles
|
||||
ret = compile_mom( as_test_main("self.main {|elem| arg = 5 } "))
|
||||
|
@ -6,7 +6,7 @@ module Vool
|
||||
include MomCompile
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@ret = compile_mom( as_test_main("return 1"))
|
||||
end
|
||||
|
||||
|
@ -5,7 +5,7 @@ module Mom
|
||||
include MomCompile
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@comp = compile_mom( "class Test ; def main(); return 'Hi'; end; end;")
|
||||
end
|
||||
|
||||
|
@ -5,7 +5,7 @@ module Mom
|
||||
include MomCompile
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
Parfait.boot!(Parfait.default_test_options)
|
||||
@comp = compile_mom( "class Test ; def main(); main{return 'Ho'};return 'Hi'; end; end;")
|
||||
@linker = @comp.translate(:interpreter)
|
||||
end
|
||||
|
Reference in New Issue
Block a user