From 17545d1525a1b4bb59e5ddb6184036c87482d478 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 16 Oct 2015 21:42:11 +0300 Subject: [PATCH] fix add test --- test/interpreter/test_add.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/interpreter/test_add.rb b/test/interpreter/test_add.rb index 96428b05..d4717939 100644 --- a/test/interpreter/test_add.rb +++ b/test/interpreter/test_add.rb @@ -48,20 +48,20 @@ class AddTest < MiniTest::Test assert_equal Register::FunctionCall , ticks(7).class assert @interpreter.link end - def dtest_adding - done = ticks(25) - assert_equal Register::OperatorInstruction , done.class - left = @interpreter.get_register(done.left) - rr = done.right + def test_adding + done_op = ticks(11) + assert_equal Register::OperatorInstruction , done_op.class + left = @interpreter.get_register(done_op.left) + rr = done_op.right right = @interpreter.get_register(rr) assert_equal Fixnum , left.class assert_equal Fixnum , right.class - assert_equal 16 , right - assert_equal 8 , left - done = ticks(1) - assert_equal Register::RegisterTransfer , done.class - result = @interpreter.get_register(rr) - assert_equal result , 16 + assert_equal 7 , right + assert_equal 12 , left + done_tr = ticks(1) + assert_equal Register::RegisterTransfer , done_tr.class + result = @interpreter.get_register(done_op.left) + assert_equal result , 12 end def test_chain