aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/runner.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 185fdcfe..035c4c78 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1195,11 +1195,15 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv):
class MyException
{
-
+ public:
+ MyException(){ std::cout << "Construct..."; }
+ MyException( const MyException & ) { std::cout << "Copy..."; }
+ ~MyException(){ std::cout << "Destruct..."; }
};
int function()
{
+ std::cout << "Throw...";
throw MyException();
}
@@ -1214,9 +1218,18 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv):
{
function2();
}
+ catch (MyException & e)
+ {
+ std::cout << "Catched...";
+ }
+
+ try
+ {
+ function2();
+ }
catch (MyException e)
{
- std::cout << "Exception catched" ;
+ std::cout << "Catched...";
}
return 0;
@@ -1224,7 +1237,7 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv):
'''
Settings.DISABLE_EXCEPTION_CATCHING = 0
- self.do_run(src, 'Exception catched')
+ self.do_run(src, 'Throw...Construct...Catched...Destruct...Throw...Construct...Copy...Catched...Destruct...Destruct...')
def test_typed_exceptions(self):
return self.skip('TODO: fix this for llvm 3.0')