aboutsummaryrefslogtreecommitdiff
path: root/tests/test_core.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_core.py')
-rw-r--r--tests/test_core.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index 66f9b8e4..87925082 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -9476,6 +9476,32 @@ def process(filename):
Settings.ALIASING_FUNCTION_POINTERS = 1 - Settings.ALIASING_FUNCTION_POINTERS # flip the test
self.do_run(src, '''Hello 7 from JS!''')
+ def test_demangle_stacks(self):
+ if Settings.ASM_JS: return self.skip('spidermonkey has stack trace issues')
+
+ src = r'''
+ #include<stdio.h>
+ #include<stdlib.h>
+
+ namespace NameSpace {
+ class Class {
+ public:
+ int Aborter(double x, char y, int *z) {
+ int addr = x+y+(int)z;
+ void *p = (void*)addr;
+ for (int i = 0; i < 100; i++) free(p); // will abort, should show proper stack trace
+ }
+ };
+ }
+
+ int main(int argc, char **argv) {
+ NameSpace::Class c;
+ c.Aborter(1.234, 'a', NULL);
+ return 0;
+ }
+ '''
+ self.do_run(src, 'NameSpace::Class::Aborter(double, char, int*)');
+
def test_embind(self):
if self.emcc_args is None: return self.skip('requires emcc')
Building.COMPILER_TEST_OPTS += ['--bind']