diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-21 19:30:19 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-21 20:47:02 +0100 |
commit | f523e1a9dd676d216b241761460b730db8c5bde7 (patch) | |
tree | 263f274b1b2cd387c1fe2a0b0c691096ea4a318e | |
parent | b74207976b1e6b4972bcfee9512b6847ebc1625e (diff) |
test for inlineasm with outputs
-rwxr-xr-x | tests/runner.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index d93105ed..881b9a36 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -2795,13 +2795,20 @@ def process(filename): src = r''' #include <stdio.h> + double get() { + double ret = 0; + __asm __volatile__("12/3.3":"=a"(ret)); + return ret; + } + int main() { asm("Module.print('Inline JS is very cool')"); + printf("%.2f\n", get()); return 0; } ''' - self.do_run(src, 'Inline JS is very cool') + self.do_run(src, 'Inline JS is very cool\n3.64') def test_memorygrowth(self): if Settings.USE_TYPED_ARRAYS == 0: return self.skip('memory growth is only supported with typed arrays') |