fix all tests for previous commit

This commit is contained in:
Torsten Ruger
2019-02-08 23:03:23 +02:00
parent 74b790250a
commit 37eeb81f45
71 changed files with 117 additions and 94 deletions

View File

@ -22,7 +22,7 @@ module MomCompile
include ScopeHelper
def compile_method(input)
statements = RubyX::RubyXCompiler.new.ruby_to_vool(input)
statements = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_vool(input)
assert statements.is_a?(Vool::ClassStatement)
ret = statements.to_mom(nil)
assert_equal Parfait::Class , statements.clazz.class , statements
@ -50,7 +50,7 @@ module MomCompile
block.body.to_mom(block_c)
end
def compile_mom(input)
RubyX::RubyXCompiler.new.ruby_to_mom(input)
RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_mom(input)
end
def check_array( should , is )

11
test/support/options.rb Normal file
View File

@ -0,0 +1,11 @@
module Parfait
def self.default_test_options
{}
end
end
module RubyX
def self.default_test_options
{ parfait: Parfait.default_test_options}
end
end

View File

@ -2,7 +2,7 @@ module Parfait
class ParfaitTest < MiniTest::Test
def setup
Parfait.boot!
Parfait.boot!(Parfait.default_test_options)
@space = Parfait.object_space
end
def make_method

View File

@ -7,7 +7,8 @@ module Risc
include ScopeHelper
def setup
@linker = RubyX::RubyXCompiler.new.ruby_to_binary(@string_input, :interpreter)
compiler = RubyX::RubyXCompiler.new(RubyX.default_test_options)
@linker = compiler.ruby_to_binary(@string_input, :interpreter)
@interpreter = Interpreter.new(@linker)
@interpreter.start_program
end