diff --git a/test/compiler/fragments/test_if.rb b/test/compiler/fragments/test_if.rb index ef37fc9e..2b0fef7d 100644 --- a/test/compiler/fragments/test_if.rb +++ b/test/compiler/fragments/test_if.rb @@ -16,7 +16,7 @@ class Object end end HERE - @length = 17 + @length = 22 check end @@ -31,7 +31,7 @@ class Object end end HERE - @length = 33 + @length = 38 @stdout = "10" check end @@ -53,7 +53,7 @@ class Object end end HERE - @length = 40 + @length = 49 @stdout = "else" check end diff --git a/test/interpreter/test_puti.rb b/test/interpreter/test_puti.rb index 21614564..62646fff 100644 --- a/test/interpreter/test_puti.rb +++ b/test/interpreter/test_puti.rb @@ -58,7 +58,7 @@ HERE # Phisol::Compiler.compile( statements , Virtual.machine.space.get_main ) @interpreter = Interpreter::Interpreter.new @interpreter.start Virtual.machine.init - # show_ticks # get output of what is + #show_ticks # get output of what is ["Branch","LoadConstant","GetSlot","SetSlot","RegisterTransfer", "FunctionCall","SaveReturn","GetSlot","LoadConstant","SetSlot", "LoadConstant","SetSlot","RegisterTransfer","FunctionCall","SaveReturn", @@ -74,7 +74,12 @@ HERE "LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot", "LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot", "LoadConstant","OperatorInstruction","IsZero","LoadConstant","GetSlot", - "LoadConstant","OperatorInstruction","IsZero","LoadConstant","NilClass"].each_with_index do |name , index| + "LoadConstant","OperatorInstruction","IsZero","LoadConstant","RegisterTransfer", + "GetSlot","FunctionReturn","GetSlot","GetSlot","SetSlot", + "GetSlot","GetSlot","GetSlot","OperatorInstruction","SetSlot", + "GetSlot","RegisterTransfer","GetSlot","FunctionReturn","GetSlot", + "RegisterTransfer","GetSlot","FunctionReturn","GetSlot","RegisterTransfer", + "GetSlot","FunctionReturn","RegisterTransfer","Syscall","NilClass"].each_with_index do |name , index| got = ticks(1) assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}" end