diff --git a/lib/rubyx/rubyx_compiler.rb b/lib/rubyx/rubyx_compiler.rb index 1abf4a2a..45b9aead 100644 --- a/lib/rubyx/rubyx_compiler.rb +++ b/lib/rubyx/rubyx_compiler.rb @@ -11,7 +11,6 @@ module RubyX def ruby_to_vool vool = RubyCompiler.compile( source ) vool = vool.normalize - #puts vool vool end diff --git a/test/vool/test_block_statement.rb b/test/vool/test_block_statement.rb new file mode 100644 index 00000000..672e9769 --- /dev/null +++ b/test/vool/test_block_statement.rb @@ -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 diff --git a/test/vool/test_class_statement.rb b/test/vool/test_class_statement.rb index 5277e137..f2de9ada 100644 --- a/test/vool/test_class_statement.rb +++ b/test/vool/test_class_statement.rb @@ -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