fix all tests for previous commit
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
require_relative "../helper"
|
||||
|
||||
module RubyX
|
||||
|
||||
module RubyXHelper
|
||||
def setup
|
||||
end
|
||||
@ -9,10 +10,10 @@ module RubyX
|
||||
mom.translate(platform)
|
||||
end
|
||||
def ruby_to_vool(input)
|
||||
RubyXCompiler.new.ruby_to_vool(input)
|
||||
RubyXCompiler.new(RubyX.default_test_options).ruby_to_vool(input)
|
||||
end
|
||||
def ruby_to_mom(input)
|
||||
RubyXCompiler.new.ruby_to_mom(input)
|
||||
RubyXCompiler.new(RubyX.default_test_options).ruby_to_mom(input)
|
||||
end
|
||||
def compile_in_test( input )
|
||||
vool = ruby_to_vool in_Test(input)
|
||||
|
@ -22,7 +22,7 @@ module RubyX
|
||||
end
|
||||
|
||||
def test_space_is_unchanged_by_compile
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
space1 = Parfait.object_space.get_class_by_name(:Space)
|
||||
compiler.ruby_to_vool "class Space ;end"
|
||||
space2 = Parfait.object_space.get_class_by_name(:Space)
|
||||
@ -30,7 +30,7 @@ module RubyX
|
||||
end
|
||||
|
||||
def test_space_type_is_unchanged_by_compile
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
space1 = Parfait.object_space.get_type_by_class_name(:Space)
|
||||
compiler.ruby_to_vool "class Space ;end"
|
||||
space2 = Parfait.object_space.get_type_by_class_name(:Space)
|
||||
|
@ -25,7 +25,7 @@ module RubyX
|
||||
end
|
||||
|
||||
def test_space_type_is_unchanged_by_compile
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
space1 = Parfait.object_space.get_type_by_class_name(:Space)
|
||||
compiler.ruby_to_vool "class Space ;end"
|
||||
space2 = Parfait.object_space.get_type_by_class_name(:Space)
|
||||
|
@ -9,23 +9,23 @@ module RubyX
|
||||
"class Space ; def #{name}(arg);return arg;end; end"
|
||||
end
|
||||
def test_return_linker
|
||||
@linker = RubyXCompiler.ruby_to_binary(space_source_for("main"), :interpreter)
|
||||
@linker = RubyXCompiler.ruby_to_binary(space_source_for("main"), :interpreter , RubyX.default_test_options)
|
||||
assert_equal Risc::Linker , @linker.class
|
||||
end
|
||||
def test_one_vool_call
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
compiler.ruby_to_vool(space_source_for("main"))
|
||||
assert_equal Vool::ClassStatement , compiler.vool.class
|
||||
end
|
||||
def test_two_vool_calls
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
compiler.ruby_to_vool(space_source_for("main"))
|
||||
compiler.ruby_to_vool(space_source_for("twain"))
|
||||
assert_equal Vool::ScopeStatement , compiler.vool.class
|
||||
assert_equal 2 , compiler.vool.length
|
||||
end
|
||||
def test_bin_two_sources
|
||||
compiler = RubyXCompiler.new
|
||||
compiler = RubyXCompiler.new(RubyX.default_test_options)
|
||||
compiler.ruby_to_vool(space_source_for("main"))
|
||||
compiler.ruby_to_vool(space_source_for("twain"))
|
||||
linker = compiler.to_binary(:interpreter)
|
||||
|
Reference in New Issue
Block a user