makes method_statements body always a scope_statement

This commit is contained in:
Torsten Ruger
2017-04-12 11:51:29 +03:00
parent 0d96f5e35f
commit a4b0666c8c
3 changed files with 34 additions and 4 deletions

View File

@@ -26,5 +26,15 @@ module Vool
assert_equal ScopeStatement , @lst.body.class
assert_equal 2 , @lst.body.length
end
def test_body_is_scope_one_statement
input = "def tryout(arg1, arg2) ; true ; end "
lst = RubyCompiler.compile( input )
assert_equal ScopeStatement , lst.body.class
end
def test_body_is_scope_zero_statement
input = "def tryout(arg1, arg2) ; ; end "
lst = RubyCompiler.compile( input )
assert_equal ScopeStatement , lst.body.class
end
end
end