Lots of preloading for tests

so many relied (implicitly( on some builtin function
after all can't do much in ruby without calling
Now all those dependencies are explicit
Small risc changes come because the macro version has a return label and unreachable label
This commit is contained in:
2019-09-13 14:07:12 +03:00
parent c9d7539479
commit 12b29285d7
52 changed files with 201 additions and 164 deletions

View File

@ -2,11 +2,10 @@ require_relative "helper"
module Risc
class TestCodeListenerFull < MiniTest::Test
include ScopeHelper
def setup
Parfait.boot!(Parfait.default_test_options)
Mom.boot!
Risc.boot!
@linker = Mom::MomCollection.new.to_risc.translate(:interpreter)
compiler = compiler_with_main()
@linker = compiler.to_target( :interpreter)
@binary = Parfait::BinaryCode.new(1)
@method = Parfait.object_space.types.values.first.methods
@label = Risc.label("hi","ho")

View File

@ -2,11 +2,10 @@ require_relative "helper"
module Risc
class TestMachinePositions < MiniTest::Test
include ScopeHelper
def setup_for(platform)
Parfait.boot!(Parfait.default_test_options)
Mom.boot!
Risc.boot!
@linker = Mom::MomCollection.new.to_risc.translate(platform)
compiler = compiler_with_main()
@linker = compiler.to_target( platform)
@linker.position_all
end
def test_cpu_init