summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 11:32:48 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:53 +0200
commit618efe4d40b7120d85e83b0d8dbff868267270ea (patch)
tree817c6ebf1d6146e34760014e7f222cbf1de61a40 /tests/test_core.py
parent3edbf126a5b79642a0463a6105b3bd584383017d (diff)
Use do_run_from_file() for test_white_list_exception
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py25
1 files changed, 3 insertions, 22 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index b1d8f0c8..0f70786d 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1255,29 +1255,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
Settings.EXCEPTION_CATCHING_WHITELIST = ["__Z12somefunctionv"]
Settings.INLINING_LIMIT = 50 # otherwise it is inlined and not identified
- src = '''
- #include <stdio.h>
-
- void thrower() {
- printf("infunc...");
- throw(99);
- printf("FAIL");
- }
-
- void somefunction() {
- try {
- thrower();
- } catch(...) {
- printf("done!*\\n");
- }
- }
+ test_path = path_from_root('tests', 'core', 'test_white_list_exception')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- somefunction();
- return 0;
- }
- '''
- self.do_run(src, 'infunc...done!*')
+ self.do_run_from_file(src, output)
Settings.DISABLE_EXCEPTION_CATCHING = 0
Settings.EXCEPTION_CATCHING_WHITELIST = []