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)
|
||||
|
Reference in New Issue
Block a user