fix mom tests
and always have a list inside a class
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user