aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-01-18 18:12:00 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-01-18 18:12:00 -0800
commitfd08013827a5fec461b374b9e0605b4ebabf7fe1 (patch)
tree45f1e8c649f3af1ed8a3cfac9a2ae30955667229 /tests/test_core.py
parent514455525bf4f8e4e72ccdef7d3f88b26fbc77e5 (diff)
parent8762f317490f82ddadf8257d29f8dc2b074b2683 (diff)
Merge pull request #2030 from waywardmonkeys/updates4
Updates 4
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py44
1 files changed, 26 insertions, 18 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index f5d18e45..b1e1ffe6 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1269,7 +1269,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
}
catch (MyException & e)
{
- std::cout << "Catched...";
+ std::cout << "Caught...";
}
try
@@ -1278,7 +1278,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
}
catch (MyException e)
{
- std::cout << "Catched...";
+ std::cout << "Caught...";
}
return 0;
@@ -1288,26 +1288,26 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
Settings.DISABLE_EXCEPTION_CATCHING = 0
if '-O2' in self.emcc_args:
self.emcc_args.pop() ; self.emcc_args.pop() # disable closure to work around a closure bug
- self.do_run(src, 'Throw...Construct...Catched...Destruct...Throw...Construct...Copy...Catched...Destruct...Destruct...')
+ self.do_run(src, 'Throw...Construct...Caught...Destruct...Throw...Construct...Copy...Caught...Destruct...Destruct...')
- def test_exception_2(self):
+ def test_exceptions_2(self):
if self.emcc_args is None: return self.skip('need emcc to add in libcxx properly')
Settings.DISABLE_EXCEPTION_CATCHING = 0
- test_path = path_from_root('tests', 'core', 'test_exception_2')
+ test_path = path_from_root('tests', 'core', 'test_exceptions_2')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
- def test_white_list_exception(self):
+ def test_exceptions_white_list(self):
if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
Settings.DISABLE_EXCEPTION_CATCHING = 2
Settings.EXCEPTION_CATCHING_WHITELIST = ["__Z12somefunctionv"]
Settings.INLINING_LIMIT = 50 # otherwise it is inlined and not identified
- test_path = path_from_root('tests', 'core', 'test_white_list_exception')
+ test_path = path_from_root('tests', 'core', 'test_exceptions_white_list')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
@@ -1315,7 +1315,7 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
Settings.DISABLE_EXCEPTION_CATCHING = 0
Settings.EXCEPTION_CATCHING_WHITELIST = []
- def test_uncaught_exception(self):
+ def test_exceptions_uncaught(self):
if self.emcc_args is None: return self.skip('no libcxx inclusion without emcc')
Settings.DISABLE_EXCEPTION_CATCHING = 0
@@ -1354,29 +1354,31 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
'''
self.do_run(src, 'success')
- def test_typed_exceptions(self):
- Settings.DISABLE_EXCEPTION_CATCHING = 0
- Settings.SAFE_HEAP = 0 # Throwing null will cause an ignorable null pointer access.
- src = open(path_from_root('tests', 'exceptions', 'typed.cpp'), 'r').read()
- expected = open(path_from_root('tests', 'exceptions', 'output.txt'), 'r').read()
- self.do_run(src, expected)
+ def test_exceptions_typed(self):
+ Settings.DISABLE_EXCEPTION_CATCHING = 0
+ Settings.SAFE_HEAP = 0 # Throwing null will cause an ignorable null pointer access.
- def test_multiexception(self):
+ test_path = path_from_root('tests', 'core', 'test_exceptions_typed')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
+
+ def test_exceptions_multi(self):
if os.environ.get('EMCC_FAST_COMPILER') == '1': return self.skip('todo in fastcomp')
Settings.DISABLE_EXCEPTION_CATCHING = 0
- test_path = path_from_root('tests', 'core', 'test_multiexception')
+ test_path = path_from_root('tests', 'core', 'test_exceptions_multi')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
- def test_std_exception(self):
+ def test_exceptions_std(self):
if self.emcc_args is None: return self.skip('requires emcc')
Settings.DISABLE_EXCEPTION_CATCHING = 0
self.emcc_args += ['-s', 'SAFE_HEAP=0']
- test_path = path_from_root('tests', 'core', 'test_std_exception')
+ test_path = path_from_root('tests', 'core', 'test_exceptions_std')
src, output = (test_path + s for s in ('.in', '.out'))
self.do_run_from_file(src, output)
@@ -4292,6 +4294,12 @@ def process(filename):
self.do_run_from_file(src, output)
+ def test_nl_types(self):
+ test_path = path_from_root('tests', 'core', 'test_nl_types')
+ src, output = (test_path + s for s in ('.in', '.out'))
+
+ self.do_run_from_file(src, output)
+
def test_799(self):
src = open(path_from_root('tests', '799.cpp'), 'r').read()
self.do_run(src, '''Set PORT family: 0, port: 3979