fix statements
as they go
This commit is contained in:
parent
7eebc775d6
commit
03979156db
@ -16,7 +16,7 @@ int main()
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,LoadConstant,OperatorInstruction,GetSlot,SetSlot,
|
||||
@expect = [Label, LoadConstant,LoadConstant,OperatorInstruction,GetSlot,SetSlot,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
@ -30,7 +30,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -42,7 +42,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant, GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant, GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -54,10 +54,10 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot, LoadConstant,SetSlot,
|
||||
LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot,GetSlot,SetSlot ,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
@expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, GetSlot ,
|
||||
SetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
def test_frame_get
|
||||
@ -69,10 +69,10 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
was = check
|
||||
get = was.next(6)
|
||||
get = was.next(5)
|
||||
assert_equal GetSlot , get.class
|
||||
assert_equal 4, get.index , "Get to frame index must be offset, not #{get.index}"
|
||||
end
|
||||
@ -86,9 +86,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
was = check
|
||||
set = was.next(3)
|
||||
set = was.next(2)
|
||||
assert_equal SetSlot , set.class
|
||||
assert_equal 10, set.index , "Set to args index must be offset, not #{set.index}"
|
||||
end
|
||||
@ -101,9 +101,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
was = check
|
||||
set = was.next(4)
|
||||
set = was.next(3)
|
||||
assert_equal SetSlot , set.class
|
||||
assert_equal 4, set.index , "Set to frame index must be offset, not #{set.index}"
|
||||
end
|
||||
@ -118,9 +118,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot , SetSlot,Label , RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot , SetSlot,Label , RegisterTransfer,GetSlot,FunctionReturn]
|
||||
was = check
|
||||
get = was.next(2)
|
||||
get = was.next(1)
|
||||
assert_equal GetSlot , get.class
|
||||
assert_equal 10, get.index , "Get to frame index must be offset, not #{get.index}"
|
||||
end
|
||||
|
@ -17,9 +17,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,LoadConstant,
|
||||
SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot ,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, Label ,
|
||||
RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -37,9 +37,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,LoadConstant,
|
||||
SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot ,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, Label ,
|
||||
RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -57,9 +57,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [ Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot,
|
||||
GetSlot,GetSlot,SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,
|
||||
GetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant, GetSlot, SetSlot, GetSlot, GetSlot, GetSlot ,
|
||||
SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot ,
|
||||
RegisterTransfer, FunctionCall, GetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -77,9 +77,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [ Label, SaveReturn,GetSlot,GetSlot,GetSlot,SetSlot,
|
||||
LoadConstant,SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,
|
||||
GetSlot ,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot ,
|
||||
LoadConstant, SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot ,
|
||||
Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -94,11 +94,11 @@ int main()
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [ Label, SaveReturn , GetSlot,GetSlot,SetSlot,LoadConstant,SetSlot,LoadConstant,
|
||||
SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall ,
|
||||
GetSlot, Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
was = check
|
||||
set = was.next(8)
|
||||
set = was.next(7)
|
||||
assert_equal SetSlot , set.class
|
||||
assert_equal 9, set.index , "Set to message must be offset, not #{set.index}"
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -34,8 +34,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,
|
||||
RegisterTransfer,FunctionCall,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot, LoadConstant, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, SetSlot ,
|
||||
Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -48,7 +49,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
assert_raises{check}
|
||||
end
|
||||
|
||||
@ -61,7 +62,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
end
|
||||
|
@ -16,7 +16,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsPlus ,
|
||||
@expect = [Label, LoadConstant,LoadConstant, OperatorInstruction,IsPlus ,
|
||||
LoadConstant,SetSlot,Branch , Label , LoadConstant ,SetSlot,
|
||||
Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
@ -33,7 +33,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,LoadConstant, OperatorInstruction,IsMinus ,
|
||||
@expect = [Label,LoadConstant,LoadConstant, OperatorInstruction,IsMinus ,
|
||||
Branch ,Label , LoadConstant ,SetSlot,
|
||||
Label,Label , RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
@ -50,7 +50,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,LoadConstant,OperatorInstruction,IsZero ,
|
||||
@expect = [Label, LoadConstant,LoadConstant,OperatorInstruction,IsZero ,
|
||||
Branch , Label , LoadConstant ,SetSlot,
|
||||
Label,Label, RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
|
@ -13,9 +13,9 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, LoadConstant ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
was = check
|
||||
set = was.next(3)
|
||||
set = was.next(2)
|
||||
assert_equal SetSlot , set.class
|
||||
should = Register.machine.space.first_message.get_layout.variable_index(:return_value)
|
||||
assert_equal should, set.index , "Set to message must got to return_value(#{should}), not #{set.index}"
|
||||
@ -30,7 +30,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -43,7 +43,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot,GetSlot,GetSlot ,SetSlot,
|
||||
Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
@ -57,7 +57,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
@expect = [Label, GetSlot,GetSlot ,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
|
||||
@ -69,10 +69,10 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,GetSlot,GetSlot,SetSlot, LoadConstant,
|
||||
SetSlot,LoadConstant,SetSlot,RegisterTransfer,FunctionCall,GetSlot ,SetSlot,Label,
|
||||
RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
@expect = [Label, GetSlot, GetSlot, SetSlot, LoadConstant, SetSlot, LoadConstant ,
|
||||
SetSlot, LoadConstant, SetSlot, RegisterTransfer, FunctionCall, GetSlot, SetSlot ,
|
||||
Label, RegisterTransfer, GetSlot, FunctionReturn]
|
||||
check
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -15,7 +15,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,Label,LoadConstant,IsPlus,LoadConstant,SetSlot,Branch,
|
||||
@expect = [Label, Label,LoadConstant,IsPlus,LoadConstant,SetSlot,Branch,
|
||||
Label,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
end
|
||||
@ -32,7 +32,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label,GetSlot,GetSlot, IsPlus,GetSlot,
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot,Label,GetSlot,GetSlot, IsPlus,GetSlot,
|
||||
GetSlot,LoadConstant,OperatorInstruction,GetSlot,SetSlot,Branch,
|
||||
Label,GetSlot,GetSlot,SetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
|
||||
check
|
||||
@ -51,7 +51,7 @@ class Object
|
||||
end
|
||||
end
|
||||
HERE
|
||||
@expect = [Label, SaveReturn,LoadConstant,GetSlot,SetSlot,Label,
|
||||
@expect = [Label, LoadConstant,GetSlot,SetSlot,Label,
|
||||
GetSlot,GetSlot,LoadConstant,OperatorInstruction,IsPlus,
|
||||
GetSlot, GetSlot,LoadConstant,OperatorInstruction, GetSlot,
|
||||
SetSlot,GetSlot, GetSlot,SetSlot,Branch , Label ,
|
||||
|
Loading…
Reference in New Issue
Block a user