From e4dce2394c0fc8e4863ebea4ec8d2b5ffa4d369d Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 8 May 2014 21:14:26 +0300 Subject: [PATCH] one test slipped through --- test/test_small_program.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/test_small_program.rb b/test/test_small_program.rb index 5c4d871b..914340eb 100644 --- a/test/test_small_program.rb +++ b/test/test_small_program.rb @@ -14,15 +14,17 @@ class TestSmallProg < MiniTest::Test def test_loop @program.main.instance_eval do - mov :r0, 5 #1 - start do - subs :r0, :r0, 1 #2 - bne :start #3 - mov :r7, 1 #4 - swi 0 #5 5 instructions + mov :left => :r0, :right => 5 #1 + start = Vm::Block.new("start") + add_code start + start.instance_eval do + #subs :left => :r0, :right => :r0, :offset => 1 #2 + #bne :left => :start #3 + mov :left => :r7, :right => 1 #4 + swi :left => 0 #5 5 instructions end end - write( 5 , "loop" ) + write( 6 , "loop" ) end def test_hello