diff options
author | ngld <ngld@tproxy.de> | 2013-11-26 23:12:09 +0100 |
---|---|---|
committer | ngld <ngld@tproxy.de> | 2013-11-26 23:12:09 +0100 |
commit | aefb4b1d6b8a5e5bdc8afba5f43eceebbaa39280 (patch) | |
tree | 3c394f16328602de94c23647f81c67086fa9400d /tests | |
parent | 29906a675d9da025fc428d1cb95ed1a0f7bfb691 (diff) |
Implemented #1573. All functions marked as "used" will be automatically added to EXPORTED_FUNCTIONS.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_core.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 67e316e4..cbde794f 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3865,6 +3865,25 @@ Exiting setjmp function, level: 0, prev_jmp: -1 process.communicate() assert process.returncode is 0, 'float.h should agree with our system' + def test_llvm_used(self): + src = r''' + #include <stdio.h> + #include <emscripten.h> + + extern "C" { + EMSCRIPTEN_KEEPALIVE void foobar(int x) { + printf("Worked! %d\n", x); + } + } + + int main() { + emscripten_run_script("Module['_foobar'](10)"); + return 0; + }''' + + Building.LLVM_OPTS = 3 + self.do_run(src, 'Worked! 10\n') + def test_emscripten_api(self): #if Settings.MICRO_OPTS or Settings.RELOOP or Building.LLVM_OPTS: return self.skip('FIXME') |