aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-25 09:52:18 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-25 09:52:18 -0700
commitba658e862ef48eae7adc40f1fbcccf47f0530e5d (patch)
tree07f4f2a02a0b0cd5fd6c8136cdba9806396bdda4 /tests
parentbf8c659ebc868649ceb570d780a8b3de9b6d18b9 (diff)
additional embind testing
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 335d7d4b..c717e021 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -8681,6 +8681,24 @@ 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_embind(self):
+ if self.emcc_args is None: return self.skip('requires emcc')
+ Building.COMPILER_TEST_OPTS += ['--bind']
+
+ src = r'''
+ #include<stdio.h>
+ #include<emscripten/val.h>
+
+ using namespace emscripten;
+
+ int main() {
+ val Math = val::global("Math");
+ printf("abs(-10): %d\n", Math.call<int>("abs", -10));
+ return 0;
+ }
+ '''
+ self.do_run(src, 'abs(-10): 10');
+
def test_scriptaclass(self):
if self.emcc_args is None: return self.skip('requires emcc')