Builtin is no more, final conversions done

All preloading where it needs to be
(some)tests for the preload
split compiler test
remembered binary tests (usually just run on travis)
This commit is contained in:
2019-09-13 20:34:41 +03:00
parent 8af17a69ea
commit 1ee01622c3
15 changed files with 74 additions and 34 deletions

View File

@ -4,18 +4,19 @@ module Mom
module Builtin
class TestObjectInitRisc < BootTest
def setup
super
@method = get_compiler("Object",:init)
Parfait.boot!(Parfait.default_test_options)
get_compiler("Space",:main)
@method = MomCollection.create_init_compiler
end
def test_mom_length
assert_equal :__init__ , @method.callable.name
assert_equal 7 , @method.mom_instructions.length
assert_equal 2 , @method.mom_instructions.length
end
def test_compile
assert_equal Risc::MethodCompiler , @method.to_risc.class
end
def test_risc_length
assert_equal 31 , @method.to_risc.risc_instructions.length
assert_equal 19 , @method.to_risc.risc_instructions.length
end
end
end