fixed more cases of empty block syndrome
This commit is contained in:
parent
6ac339d998
commit
c68577c3f4
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user