use fake memory
fix integer offset bug (which only didn’t cause errors as fixnums are still an order too big and the famous +1 error hit the empty space)
This commit is contained in:
@ -36,7 +36,7 @@ module Risc
|
||||
sl = main_ticks(26)
|
||||
assert_equal SlotToReg , sl.class
|
||||
assert_equal :r1 , sl.array.symbol
|
||||
assert_equal 3 , sl.index
|
||||
assert_equal 2 , sl.index
|
||||
assert_equal :r1 , sl.register.symbol
|
||||
assert_equal 9 , @interpreter.get_register(:r1)
|
||||
end
|
||||
|
@ -61,7 +61,7 @@ module Risc
|
||||
sl = main_ticks( base + 3 )
|
||||
assert_equal SlotToReg , sl.class
|
||||
assert_equal :r1 , sl.array.symbol #load from message
|
||||
assert_equal 3 , sl.index
|
||||
assert_equal 2 , sl.index
|
||||
assert_equal :r1 , sl.register.symbol
|
||||
end
|
||||
def test_op
|
||||
|
@ -60,7 +60,7 @@ module Risc
|
||||
assert_equal RegToSlot , sl.class
|
||||
assert_equal :r1 , sl.register.symbol #return
|
||||
assert_equal :r2 , sl.array.symbol #parfait integer
|
||||
assert_equal 3 , sl.index
|
||||
assert_equal 2 , sl.index
|
||||
end
|
||||
def test_return
|
||||
done = main_ticks(43)
|
||||
|
@ -39,7 +39,7 @@ module Risc
|
||||
end
|
||||
def test_first_binary_jump
|
||||
bin = Parfait.object_space.get_init.binary
|
||||
assert 0 != bin.get_word(14) , "index 0 is 0 #{bin.inspect}"
|
||||
assert 0 != bin.get_word(Parfait::BinaryCode.data_length) , "index 0 is 0 #{bin.inspect}"
|
||||
end
|
||||
def test_second_binary_first
|
||||
bin = Parfait.object_space.get_init.binary.next
|
||||
|
Reference in New Issue
Block a user