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.
25 lines
552 B
Ruby
25 lines
552 B
Ruby
require_relative "helper"
|
|
|
|
module RubyX
|
|
|
|
class TestObjecCompile < MiniTest::Test
|
|
include ParfaitHelper
|
|
def source
|
|
load_parfait(:object)
|
|
end
|
|
def test_load
|
|
assert source.include?("class Object")
|
|
assert source.length > 2000
|
|
end
|
|
def test_vool
|
|
vool = compiler.ruby_to_vool source
|
|
assert_equal Vool::ClassStatement , vool.class
|
|
assert_equal :Object , vool.name
|
|
end
|
|
def test_mom
|
|
vool = compiler.ruby_to_mom source
|
|
assert_equal Mom::MomCollection , vool.class
|
|
end
|
|
end
|
|
end
|