diff options
Diffstat (limited to 'test')
m--------- | test/emscripten | 0 | ||||
-rw-r--r-- | test/wasm_backend/hello_world_real.cpp | 6 | ||||
-rw-r--r-- | test/wasm_backend/hello_world_real.txt | 1 | ||||
-rw-r--r-- | test/wasm_backend/indirect_call.cpp | 4 | ||||
-rw-r--r-- | test/wasm_backend/indirect_call.txt | 8 |
5 files changed, 9 insertions, 10 deletions
diff --git a/test/emscripten b/test/emscripten -Subproject 4dae3d92279887e64f2afdb60c162ecd4feab8a +Subproject c7b7edf205c93b80d8e34c3e7f9100eb41b7c38 diff --git a/test/wasm_backend/hello_world_real.cpp b/test/wasm_backend/hello_world_real.cpp new file mode 100644 index 000000000..1e39e8bd4 --- /dev/null +++ b/test/wasm_backend/hello_world_real.cpp @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main() { + printf("hello, world!\n"); +} + diff --git a/test/wasm_backend/hello_world_real.txt b/test/wasm_backend/hello_world_real.txt new file mode 100644 index 000000000..270c611ee --- /dev/null +++ b/test/wasm_backend/hello_world_real.txt @@ -0,0 +1 @@ +hello, world! diff --git a/test/wasm_backend/indirect_call.cpp b/test/wasm_backend/indirect_call.cpp index 75c459199..ef52a4ad1 100644 --- a/test/wasm_backend/indirect_call.cpp +++ b/test/wasm_backend/indirect_call.cpp @@ -37,13 +37,13 @@ int main(int argc, char **argv) { for (int i = 0; i < 4 && i < argc*4; i++) { print("i", i); v curr = f1[i]; - print("curr address to call", (int)curr); + //print("curr address to call", (int)curr); curr(); } vi f2[4] = { other, yet, other, yet }; for (int i = 0; i < 4 && i < argc*4; i++) { vi curr = f2[i]; - print("curr", (int)curr); + //print("curr", (int)curr); curr(i); } } diff --git a/test/wasm_backend/indirect_call.txt b/test/wasm_backend/indirect_call.txt index 8d60cc1ff..8e10834ad 100644 --- a/test/wasm_backend/indirect_call.txt +++ b/test/wasm_backend/indirect_call.txt @@ -2,22 +2,14 @@ print: argc : 1 print: addr of something : 0 print: addr of more : 1 print: i : 0 -print: curr address to call : 0 print: something : 12 print: i : 1 -print: curr address to call : 1 print: more : -1 print: i : 2 -print: curr address to call : 0 print: something : 12 print: i : 3 -print: curr address to call : 1 print: more : -1 -print: curr : 2 print: other : 40 -print: curr : 3 print: yet : 100 -print: curr : 2 print: other : 42 -print: curr : 3 print: yet : 102 |