summaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 11:50:50 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-07 19:35:54 +0200
commitf45fab9e459a39b06383f3029078c7977f21aa8b (patch)
tree3ee80e03f5fa4d5093ea8524a3ee28aca107c52a /tests/test_core.py
parent5b3a08da267f4b8bbdf66574dff5dc8066f99691 (diff)
Use do_run_from_file() for test_dynamic_cast_2
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 75706525..f6852b0a 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -1514,19 +1514,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co
def test_dynamic_cast_2(self):
if self.emcc_args is None: return self.skip('need libcxxabi')
- src = r'''
- #include <stdio.h>
- #include <typeinfo>
-
- class Class {};
+ test_path = path_from_root('tests', 'core', 'test_dynamic_cast_2')
+ src, output = (test_path + s for s in ('.in', '.out'))
- int main() {
- const Class* dp = dynamic_cast<const Class*>(&typeid(Class));
- // should return dp == NULL,
- printf("pointer: %p\n", dp);
- }
- '''
- self.do_run(src, "pointer: (nil)")
+ self.do_run_from_file(src, output)
def test_funcptr(self):
src = '''