diff options
-rwxr-xr-x | emcc_to_polyfill.sh | 2 | ||||
-rw-r--r-- | test/add.c | 6 | ||||
-rw-r--r-- | test/add.post.js | 6 | ||||
-rw-r--r-- | test/add.txt | 5 |
4 files changed, 19 insertions, 0 deletions
diff --git a/emcc_to_polyfill.sh b/emcc_to_polyfill.sh index 7fa54f84b..f806aa1dd 100755 --- a/emcc_to_polyfill.sh +++ b/emcc_to_polyfill.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -e + echo "calling emcc" emcc $1 -o a.html --separate-asm -O2 -profiling -s DEMANGLE_SUPPORT=1 -s TOTAL_MEMORY=67108864 diff --git a/test/add.c b/test/add.c new file mode 100644 index 000000000..a7d7e982f --- /dev/null +++ b/test/add.c @@ -0,0 +1,6 @@ +#include <emscripten.h> + +int EMSCRIPTEN_KEEPALIVE add(int x, int y) { + return x + y; +} + diff --git a/test/add.post.js b/test/add.post.js new file mode 100644 index 000000000..a5ceeda53 --- /dev/null +++ b/test/add.post.js @@ -0,0 +1,6 @@ + +Module.print(Module._add(1, 1)); +Module.print(Module._add(5, 6)); +Module.print(Module._add(6, 5)); +Module.print(Module._add(-12, 101)); + diff --git a/test/add.txt b/test/add.txt new file mode 100644 index 000000000..f57c2a3b9 --- /dev/null +++ b/test/add.txt @@ -0,0 +1,5 @@ +2 +11 +11 +89 + |