aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-10-27 13:02:37 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2013-10-27 13:14:22 +0700
commit5017df14dbeadcb486a5b8b95533142ee4296fd1 (patch)
treeddb6330f496b47730557fccb1ca7284befbadfb9 /tests
parent14c6628d28648cd069a9e0e519cc69513e3d470b (diff)
Fix an issue with Boost compilation.
The issue is that when these macros are defined, libcxx creates inline functions and so we end up with 2 separate defintions of these functions (one inline in std and one that is extern "C"). We undef these until libcxx is fixed. Without this, some things can fail to compile correctly, like Boost. Fixes issue #1716.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_core.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py
index dd5b1e39..b766ac74 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -2949,6 +2949,23 @@ Exiting setjmp function, level: 0, prev_jmp: -1
'''
self.do_run(src, '3.14159')
+ def test_iswdigit(self):
+ if self.emcc_args is None: return self.skip('no libcxx inclusion without emcc')
+
+ src = '''
+ #include <stdio.h>
+ #include <cctype>
+ #include <cwctype>
+
+ int main() {
+ using namespace std;
+ printf("%d ", isdigit('0'));
+ printf("%d ", iswdigit(L'0'));
+ return 0;
+ }
+ '''
+ self.do_run(src, '1 1')
+
def test_polymorph(self):
if self.emcc_args is None: return self.skip('requires emcc')
src = '''