fix add test

This commit is contained in:
Torsten Ruger 2015-10-16 21:42:11 +03:00
parent 3e79e5cf8e
commit 17545d1525

View File

@ -48,20 +48,20 @@ class AddTest < MiniTest::Test
assert_equal Register::FunctionCall , ticks(7).class assert_equal Register::FunctionCall , ticks(7).class
assert @interpreter.link assert @interpreter.link
end end
def dtest_adding def test_adding
done = ticks(25) done_op = ticks(11)
assert_equal Register::OperatorInstruction , done.class assert_equal Register::OperatorInstruction , done_op.class
left = @interpreter.get_register(done.left) left = @interpreter.get_register(done_op.left)
rr = done.right rr = done_op.right
right = @interpreter.get_register(rr) right = @interpreter.get_register(rr)
assert_equal Fixnum , left.class assert_equal Fixnum , left.class
assert_equal Fixnum , right.class assert_equal Fixnum , right.class
assert_equal 16 , right assert_equal 7 , right
assert_equal 8 , left assert_equal 12 , left
done = ticks(1) done_tr = ticks(1)
assert_equal Register::RegisterTransfer , done.class assert_equal Register::RegisterTransfer , done_tr.class
result = @interpreter.get_register(rr) result = @interpreter.get_register(done_op.left)
assert_equal result , 16 assert_equal result , 12
end end
def test_chain def test_chain