fixed more cases of empty block syndrome
This commit is contained in:
parent
6ac339d998
commit
c68577c3f4
@ -16,7 +16,7 @@ class Object
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
HERE
|
HERE
|
||||||
@length = 17
|
@length = 22
|
||||||
check
|
check
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ class Object
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
HERE
|
HERE
|
||||||
@length = 33
|
@length = 38
|
||||||
@stdout = "10"
|
@stdout = "10"
|
||||||
check
|
check
|
||||||
end
|
end
|
||||||
@ -53,7 +53,7 @@ class Object
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
HERE
|
HERE
|
||||||
@length = 40
|
@length = 49
|
||||||
@stdout = "else"
|
@stdout = "else"
|
||||||
check
|
check
|
||||||
end
|
end
|
||||||
|
@ -58,7 +58,7 @@ HERE
|
|||||||
# Phisol::Compiler.compile( statements , Virtual.machine.space.get_main )
|
# Phisol::Compiler.compile( statements , Virtual.machine.space.get_main )
|
||||||
@interpreter = Interpreter::Interpreter.new
|
@interpreter = Interpreter::Interpreter.new
|
||||||
@interpreter.start Virtual.machine.init
|
@interpreter.start Virtual.machine.init
|
||||||
# show_ticks # get output of what is
|
#show_ticks # get output of what is
|
||||||
["Branch","LoadConstant","GetSlot","SetSlot","RegisterTransfer",
|
["Branch","LoadConstant","GetSlot","SetSlot","RegisterTransfer",
|
||||||
"FunctionCall","SaveReturn","GetSlot","LoadConstant","SetSlot",
|
"FunctionCall","SaveReturn","GetSlot","LoadConstant","SetSlot",
|
||||||
"LoadConstant","SetSlot","RegisterTransfer","FunctionCall","SaveReturn",
|
"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","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)
|
got = ticks(1)
|
||||||
assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}"
|
assert got.class.name.index(name) , "Wrong class for #{index+1}, expect #{name} , got #{got}"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user