diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-03-24 11:14:04 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-03-24 11:14:04 -0700 |
commit | 97b99d6e689d0740b85be1ad7279df7a1ca74f7f (patch) | |
tree | 8fd5715165fc35aeeae7fcb581e455f369368195 /tests | |
parent | e309c2077097725c71e2cd0f20d3ada3b5f79bf6 (diff) |
fix caching of asm const strings; fixes #2253
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/test_inlinejs3.in | 5 | ||||
-rw-r--r-- | tests/core/test_inlinejs3.out | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/core/test_inlinejs3.in b/tests/core/test_inlinejs3.in index da720a3d..b45abe95 100644 --- a/tests/core/test_inlinejs3.in +++ b/tests/core/test_inlinejs3.in @@ -1,6 +1,10 @@ #include <stdio.h> #include <emscripten.h> +void loop_iter() { + EM_ASM(Module.print('loop iter!')); +} + int main(int argc, char **argv) { EM_ASM(Module.print('hello dere1')); EM_ASM("Module.print('hello dere2');"); @@ -21,5 +25,6 @@ int main(int argc, char **argv) { sum = 0; sum = EM_ASM_INT_V({ return globalVar }); // no inputs, just output printf("sum: %d\n", sum); + for (int i = 0; i < argc*2; i++) loop_iter(); return 0; } diff --git a/tests/core/test_inlinejs3.out b/tests/core/test_inlinejs3.out index 1f64a89a..5d185adc 100644 --- a/tests/core/test_inlinejs3.out +++ b/tests/core/test_inlinejs3.out @@ -11,3 +11,5 @@ i: 0,0.00 i: 1,0.08 i: 2,0.17 sum: 6 +loop iter! +loop iter! |