fix most of mom from calling changes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
require_relative "helper"
|
||||
|
||||
module Mom
|
||||
class TestBlockCompiler < MiniTest::Test
|
||||
class TestBlockCompiler1 < MiniTest::Test
|
||||
include ScopeHelper
|
||||
|
||||
def setup
|
||||
@ -9,6 +9,25 @@ module Mom
|
||||
@risc = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_risc(code)
|
||||
end
|
||||
|
||||
def test_collection
|
||||
assert_equal Risc::RiscCollection, @risc.class
|
||||
end
|
||||
def test_main_compiler
|
||||
assert_equal :main , @risc.method_compilers.first.callable.name
|
||||
end
|
||||
def test_main_block_compiler
|
||||
assert_equal :main , @risc.method_compilers.first.block_compilers.first.in_method.name
|
||||
assert_equal :main_block , @risc.method_compilers.first.block_compilers.first.callable.name
|
||||
end
|
||||
end
|
||||
class TestBlockCompiler2 < MiniTest::Test
|
||||
include ScopeHelper
|
||||
|
||||
def setup
|
||||
code = as_test_main_block("return arg" , "arg = 1")
|
||||
@risc = RubyX::RubyXCompiler.new(RubyX.default_test_options).ruby_to_risc(code)
|
||||
end
|
||||
|
||||
def test_collection
|
||||
assert_equal Risc::RiscCollection, @risc.class
|
||||
end
|
||||
|
Reference in New Issue
Block a user