first while test working

fixed logic error in test framework
This commit is contained in:
Torsten Ruger
2018-03-16 12:33:11 +05:30
parent ea882f403a
commit 35a0952943
9 changed files with 71 additions and 58 deletions

View File

@ -22,11 +22,13 @@ module MomCompile
include CompilerHelper
def compile_first_method input
lst = Vool::VoolCompiler.ruby_to_vool as_test_main( input )
assert_equal Parfait::Class , lst.clazz.class , lst
@method = lst.clazz.get_method(:main)
# works a lot like Vool.ruby_to_vool
statements = Vool::RubyCompiler.compile as_test_main( input )
statements = statements.normalize
res = statements.create_objects
assert_equal Parfait::Class , statements.clazz.class , statements
@method = statements.clazz.get_method(:main)
assert_equal Parfait::VoolMethod , @method.class
res = lst.create_objects
#puts "#{res.class}"
res
end