more class methods

This commit is contained in:
Torsten Ruger
2015-10-26 22:23:06 +02:00
parent 5b7c98f50b
commit 638c367e00
3 changed files with 53 additions and 19 deletions

View File

@ -21,6 +21,25 @@ HERE
check
end
def test_class_call
@string_input = <<HERE
class Bar
int self.buh()
return 1
end
end
class Object
int main()
return Bar.buh()
end
end
HERE
@length = 30
@expect = [Label, SaveReturn,GetSlot,LoadConstant,SetSlot,LoadConstant,SetSlot,
RegisterTransfer,FunctionCall,GetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check
end
def test_class_field_value
@string_input = <<HERE
class Object
@ -43,6 +62,7 @@ class Object
end
end
HERE
@length = 17
@expect = [Label, SaveReturn,GetSlot,GetSlot,Label,RegisterTransfer,GetSlot,FunctionReturn]
check
end