diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-25 09:52:18 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-25 09:52:18 -0700 |
commit | ba658e862ef48eae7adc40f1fbcccf47f0530e5d (patch) | |
tree | 07f4f2a02a0b0cd5fd6c8136cdba9806396bdda4 /tests | |
parent | bf8c659ebc868649ceb570d780a8b3de9b6d18b9 (diff) |
additional embind testing
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 18 |
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') |