aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-07 12:55:49 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 12:55:49 -0800
commitab399ca532fb1deb7607f6cc2feb01186d75ec2b (patch)
treefc35b9a14272c00543d1f7edafa752a61cb6de6a /tests
parentb0b611c9f738d3badceb6d00f56ef25a79a76aea (diff)
properly implement uitofp/sitofp using our existing code for that; fixes #745
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 08dec7b3..1480afe7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1083,6 +1083,32 @@ m_divisor is 1091269979
'''
self.do_run(src, '<=0')
+ def test_i64_qdouble(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')
+
+ src = r'''
+ #include <stdio.h>
+ typedef long long qint64; /* 64 bit signed */
+ typedef double qreal;
+
+
+ int main(int argc, char **argv)
+ {
+ qreal c = 111;
+ qint64 d = -111 + (argc - 1);
+ c += d;
+ if (c < -1 || c > 1)
+ {
+ printf("Failed!\n");
+ }
+ else
+ {
+ printf("Succeeded!\n");
+ }
+ };
+ '''
+ self.do_run(src, 'Succeeded!')
+
def test_i32_mul_precise(self):
if self.emcc_args == None: return self.skip('needs ta2')