class Point var _x as int var _y as int cue init .init(0, 0) cue init(x as int, y as int) base.init _x = x _y = y def main is shared p1 as Point = Point() p2 as Point = Point(3, 4) p1.setXY(1, 2) p2.setXY(1, 2) p1.moreTests def moreTests .testInvocations .testUnderInvocations def setXY(x as int, y as int) _x = x _y = y def x as int # poor example as this would normally be a property # but we're testing methods in this file, not properties return _x def y as int return _y def someInt as int return 5 def someBool as bool return true def someString1 as String return 'aoeu' def someString2 as String return '' def someObject1 as Object return 'aoeu' def someObject2 as Object return 5 def someObject3 as Point return Point() def testInvocations assert .someInt == 5 assert .someBool assert .someString1 == 'aoeu' assert .someString2 == '' assert .someObject1 == 'aoeu' assert .someObject2 == 5 assert .someObject3.x == 0 and .someObject3.y == 0 def _someInt as int return 5 def _someBool as bool return true def _someString1 as String return 'aoeu' def _someString2 as String return '' def _someObject1 as Object return 'aoeu' def _someObject2 as Object return 5 def _someObject3 as Point return Point() def testUnderInvocations assert _someInt == 5 assert _someBool assert _someString1 == 'aoeu' assert _someString2 == '' assert _someObject1 == 'aoeu' assert _someObject2 == 5 assert _someObject3.x == 0 and .someObject3.y == 0 .setXY(_someInt, _someInt)