diff options
Diffstat (limited to 'tests/test_core.py')
-rw-r--r-- | tests/test_core.py | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 50e4baa0..162d8525 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -1498,24 +1498,10 @@ class T(RunnerCore): # Short name, to make it more fun to use manually on the co def test_dynamic_cast(self): if self.emcc_args is None: return self.skip('need libcxxabi') - src = r''' - #include <stdio.h> - - struct Support { - virtual void f() { - printf("f()\n"); - } - }; - - struct Derived : Support { - }; + test_path = path_from_root('tests', 'core', 'test_dynamic_cast') + src, output = (test_path + s for s in ('.in', '.out')) - int main() { - Support * p = new Derived; - dynamic_cast<Derived*>(p)->f(); - } - ''' - self.do_run(src, 'f()\n') + self.do_run_from_file(src, output) def test_dynamic_cast_b(self): if self.emcc_args is None: return self.skip('need libcxxabi') |