class Test var _x as int def goodFoo as int ensure result==5 body return 5 def badFoo as int ensure result==5 body return 50 def main is shared t = Test() t.goodFoo expect EnsureException t.badFoo