Fixing tests for implicit return

previous commit affected rather many test, as the implicit returns add extra instructions
Also added some explicit returns, so as not to test the return logic too much. return (ie return nl) is a knonwn 3 risc operation.
This commit is contained in:
2019-08-17 23:29:42 +03:00
parent 32f908c127
commit 5a43cbff15
43 changed files with 152 additions and 107 deletions

View File

@ -5,21 +5,20 @@ module RubyX
class TestObjecCompile < MiniTest::Test
include ParfaitHelper
def source
load_parfait(:object2)
load_parfait(:object)
end
def test_load
assert source.include?("class Object")
assert source.length > 2000
end
def est_vool
def test_vool
vool = compiler.ruby_to_vool source
assert_equal Vool::ClassStatement , vool.class
assert_equal :Object , vool.name
end
def est_mom
def test_mom
vool = compiler.ruby_to_mom source
assert_equal Vool::ClassStatement , vool.class
assert_equal :Object , vool.name
assert_equal Mom::MomCollection , vool.class
end
end
end