diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_core.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 80933937..b4668584 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -3841,25 +3841,26 @@ def process(filename): self.do_run(src, '4\n200\ndone\n') def test_inlinejs3(self): - if Settings.ASM_JS: return self.skip('asm does not support random code, TODO: something that works in asm') - src = r''' - #include <stdio.h> - #include <emscripten.h> + src = r''' + #include <stdio.h> + #include <emscripten.h> - int main() { - EM_ASM(Module.print('hello dere1')); - EM_ASM( - Module.print('hello dere2'); - ); + int main() { + EM_ASM(Module.print('hello dere1')); + EM_ASM( + Module.print('hello dere2'); + ); + for (int i = 0; i < 3; i++) { EM_ASM( Module.print('hello dere3'); Module.print('hello dere' + 4); ); - return 0; } - ''' + return 0; + } + ''' - self.do_run(src, 'hello dere1\nhello dere2\nhello dere3\nhello dere4\n') + self.do_run(src, 'hello dere1\nhello dere2\nhello dere3\nhello dere4\nhello dere3\nhello dere4\nhello dere3\nhello dere4\n') def test_memorygrowth(self): if Settings.USE_TYPED_ARRAYS == 0: return self.skip('memory growth is only supported with typed arrays') |