fix mom tests

and always have a list inside a class
This commit is contained in:
Torsten Ruger
2018-06-29 23:29:10 +03:00
parent 5b87133df2
commit 8d7a2fe4d6
8 changed files with 42 additions and 32 deletions

View File

@ -38,19 +38,20 @@ module Risc
def test_creates_method_statement_in_class
clazz = RubyX::RubyXCompiler.ruby_to_vool in_Test("def meth; @ivar = 5 ;end")
assert_equal Vool::MethodStatement , clazz.body.class
assert_equal Vool::Statements , clazz.body.class
assert_equal Vool::MethodStatement , clazz.body.first.class
end
def test_method_statement_has_class
vool = RubyX::RubyXCompiler.ruby_to_vool in_Test("def meth; @ivar = 5;end")
clazz = vool.to_mom(nil)
assert vool.body.clazz
assert vool.body.first.clazz
end
def test_parfait_class_creation
vool = RubyX::RubyXCompiler.ruby_to_vool in_Test("def meth; @ivar = 5;end")
clazz = vool.to_mom(nil)
assert_equal Parfait::Class , vool.body.clazz.class
assert_equal Parfait::Class , vool.body.first.clazz.class
end
def test_typed_method_instance_type