aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-02-20 16:33:29 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-02-20 16:33:29 -0800
commitdce46c9c2a9382070e81a2fd16747dea2c5c54c5 (patch)
tree602fb15ce8700dd8fb1cbeee4b63e5bd40883177 /tests
parentc9d030fc29a8f623f75fb287d0ad3ec17860b422 (diff)
build base type_info class with libcxxabi, fixes #862
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 89bc3d32..4c42bb6e 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2845,6 +2845,23 @@ Exiting setjmp function, level: 0, prev_jmp: -1
'''
self.do_run(src, 'a1: 0\na2: 0\na3: 1\nb1: 0\nb2: 1\nb3: 1\nc1: 1\nc2: 1\nc3: 1\n')
+ 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 {};
+
+ 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)")
+
def test_funcptr(self):
src = '''
#include <stdio.h>