move to parfait integers in risc layer

loading constants means loading parfait objects
objects have to me collected in machine
integer ok, string/true/false/nil next
This commit is contained in:
Torsten Ruger
2018-03-31 13:25:59 +03:00
parent 6e941ebcb7
commit 9e9b5c7f37
6 changed files with 31 additions and 2 deletions

View File

@ -11,6 +11,12 @@ module Risc
assert_equal Hash , objects.class
assert 350 < objects.length
end
def test_constant_fail
assert_raises {@machine.add_constant( 1 )}
end
def test_constant
assert @machine.add_constant( Parfait::Integer.new(5) )
end
end
class TestMachinePositions < MiniTest::Test
def setup