diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:07:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-10-31 20:07:54 -0700 |
commit | b85cd243b3e289e0dda56d37cd7649883a085e6a (patch) | |
tree | 0e847c084b0f1225abc364012efdf68b07c98323 /test | |
parent | 0aa0bf8fe5e87cfafee3d13209f0457b3e3f7764 (diff) | |
download | binaryen-b85cd243b3e289e0dda56d37cd7649883a085e6a.tar.gz binaryen-b85cd243b3e289e0dda56d37cd7649883a085e6a.tar.bz2 binaryen-b85cd243b3e289e0dda56d37cd7649883a085e6a.zip |
add simple add test
Diffstat (limited to 'test')
-rw-r--r-- | test/add.c | 6 | ||||
-rw-r--r-- | test/add.post.js | 6 | ||||
-rw-r--r-- | test/add.txt | 5 |
3 files changed, 17 insertions, 0 deletions
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 + |