namespace Test class Test def main is shared # more testing of the assert statement # now that we can intercept the exception loc as int # general catch loc = 0 try assert 0 catch loc = 1 assert loc==1 # specific catch loc = 0 try assert 0 catch ae as AssertException loc = 1 catch e as Exception CobraCore.noOp(e) loc = 2 assert loc==1 # no info try assert 0 catch ae as AssertException assert ae.info is nil success assert 0 # string info try assert 0, 'hi' catch ae as AssertException assert ae.info.equals('hi') success assert 0 # int info try assert 0, 1 catch ae as AssertException assert ae.info.equals(1) success assert 0 # TODO: assert something about the ae.message in the last 3 cases