remove use_reg on compiler and SA for load

This commit is contained in:
2020-02-29 17:17:58 +02:00
parent 0ce14bdfd1
commit 77003eed06
3 changed files with 42 additions and 8 deletions

View File

@ -0,0 +1,32 @@
require_relative "../helper"
module Risc
class TestLoadConstant < MiniTest::Test
def setup
Parfait.boot!({})
end
def load(const = SlotMachine::StringConstant.new("hi") )
Risc.load_constant("source" , const)
end
def test_const
assert_equal LoadConstant , load.class
end
def test_const_reg
assert load.register.is_object?
end
end
class TestLoadConstant1 < MiniTest::Test
def setup
Parfait.boot!({})
end
def load(const = Parfait.new_word("hi") )
Risc.load_constant("source" , const)
end
def test_parf
assert_equal LoadConstant , load.class
end
def test_parf_reg
assert load.register.is_object?
end
end
end