aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-30 09:52:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:04 -0700
commit650a1d7857ea0dc7a373a54f75d011d34f3103c3 (patch)
tree9bfeeb16079f9e534970cebe4c68d943f334b81c /tests
parent2c44a12bc755e4b59619a18027ab5b1a0752e0f1 (diff)
finalize floats during relocation in side modules
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 7f772d07..0db58f4e 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -10638,6 +10638,18 @@ f.close()
int sidey() { return 11; }
''', 'other says 11.')
+ # finalization of float variables should pass asm.js validation
+ test('floats', '', '''
+ #include <stdio.h>
+ extern float sidey();
+ int main() {
+ printf("other says %.2f.", sidey()+1);
+ return 0;
+ }
+ ''', '''
+ float sidey() { return 11.5; }
+ ''', 'other says 12.50')
+
# memory initialization in both
test('multiple memory inits', '', r'''
#include <stdio.h>