start to test block_statement
This commit is contained in:
parent
2485f7e9eb
commit
16d91f24ce
@ -11,7 +11,6 @@ module RubyX
|
||||
def ruby_to_vool
|
||||
vool = RubyCompiler.compile( source )
|
||||
vool = vool.normalize
|
||||
#puts vool
|
||||
vool
|
||||
end
|
||||
|
||||
|
22
test/vool/test_block_statement.rb
Normal file
22
test/vool/test_block_statement.rb
Normal 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
|
@ -7,7 +7,7 @@ module Vool
|
||||
|
||||
def setup
|
||||
Parfait.boot!
|
||||
@ret = compile_mom( "class Test ; def main(); return 1; end; end;")
|
||||
@ret = compile_mom( as_test_main("return 1"))
|
||||
end
|
||||
|
||||
def test_return_class
|
||||
|
Loading…
Reference in New Issue
Block a user