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:
@ -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
|
||||
|
Reference in New Issue
Block a user