start to test block_statement

This commit is contained in:
Torsten Ruger 2018-07-04 23:21:11 +03:00
parent 2485f7e9eb
commit 16d91f24ce
3 changed files with 23 additions and 2 deletions

View File

@ -11,7 +11,6 @@ module RubyX
def ruby_to_vool def ruby_to_vool
vool = RubyCompiler.compile( source ) vool = RubyCompiler.compile( source )
vool = vool.normalize vool = vool.normalize
#puts vool
vool vool
end end

View File

@ -0,0 +1,22 @@
require_relative "helper"
module Vool
class TestBlockStatement < MiniTest::Test
include MomCompile
def setup
Parfait.boot!
@ret = compile_mom( as_test_main("self.main {|elem| elem } "))
end
def test_is_compiler
assert_equal Mom::MomCompiler , @ret.class
end
def est_has_compilers
assert_equal Risc::MethodCompiler , @ret.method_compilers.first.class
end
end
end

View File

@ -7,7 +7,7 @@ module Vool
def setup def setup
Parfait.boot! Parfait.boot!
@ret = compile_mom( "class Test ; def main(); return 1; end; end;") @ret = compile_mom( as_test_main("return 1"))
end end
def test_return_class def test_return_class