diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 11:36:12 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:54 +0200 |
commit | 6fdd8f7222a1ba02ad63116e9a602ea69fac178e (patch) | |
tree | 6029fe5eef0ae388176be997a1ab46786b1e59e7 /tests/test_core.py | |
parent | c287ef1ae8d4a5349ba677086702ae085dd4cfda (diff) |
Use do_run_from_file() for test_std_exception
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index c33bef18..6e378785 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1322,22 +1322,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co Settings.DISABLE_EXCEPTION_CATCHING = 0 self.emcc_args += ['-s', 'SAFE_HEAP=0'] - src = r''' - #include <stdio.h> - #include <exception> + test_path = path_from_root('tests', 'core', 'test_std_exception') + src, output = (test_path + s for s in ('.in', '.out')) - int main() - { - std::exception e; - try { - throw e; - } catch(std::exception e) { - printf("caught std::exception\n"); - } - return 0; - } - ''' - self.do_run(src, 'caught std::exception') + self.do_run_from_file(src, output) def test_async_exit(self): open('main.c', 'w').write(r''' |