get those integers crated and used

This commit is contained in:
Torsten Ruger
2018-03-31 20:21:27 +03:00
parent 5b92b6b785
commit 4725b81270
7 changed files with 37 additions and 12 deletions

View File

@ -22,6 +22,17 @@ class TestSpace < MiniTest::Test
assert @space.false_object , "No lies"
assert @space.nil_object , "No nothing"
end
def test_integer_first
assert @space.next_integer
end
def test_integer_20
int = @space.next_integer
20.times do
assert int
assert_equal Parfait::Integer , int.class
int = int.next_integer
end
end
def test_methods_booted
word = @space.get_class_by_name(:Word).instance_type
assert_equal 4 , word.method_names.get_length

View File

@ -9,7 +9,7 @@ module Risc
super
end
def est_add
def test_add
#show_ticks # get output of what is
check_chain [Branch, Label, LoadConstant, SlotToReg, LoadConstant,
SlotToReg, SlotToReg, RegToSlot, LoadConstant, SlotToReg,
@ -23,10 +23,11 @@ module Risc
LoadConstant, SlotToReg, SlotToReg, RegToSlot, LoadConstant,
SlotToReg, RegToSlot, SlotToReg, LoadConstant, FunctionCall,
Label, SlotToReg, SlotToReg, SlotToReg, SlotToReg,
SlotToReg, OperatorInstruction, RegToSlot, Label, NilClass]
assert_equal 10 , get_return
SlotToReg, OperatorInstruction, LoadConstant, SlotToReg, SlotToReg,
RegToSlot, RegToSlot, RegToSlot, Label, NilClass]
assert_equal Parfait::Integer , get_return.class
# assert_equal 10 , get_return.value
end
def test_load_5
lod = ticks( 46 )
assert_equal LoadConstant , lod.class