aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-08-29 16:27:19 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-08-29 16:27:19 -0700
commit2d206b313f2c2292f8b365ac22132d4d13af391e (patch)
tree5138a2c65bada89bd7922f95e4ea9df695e44bef /tests
parentffc362f182bffb1f355508847da3f1074efecdd4 (diff)
fix extension of non-i32s to >i32s
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 563f6bc1..18c9bc0f 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -953,6 +953,22 @@ m_divisor is 1091269979
'''
self.do_run(src, 'zero 2, 104', ['hallo'])
+ def test_i64_i16(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')
+
+ src = r'''
+ #include <stdio.h>
+ int main(int argc, char ** argv){
+ int y=-133;
+ __int64_t x= ((__int64_t)((short)(y)))*(100 + argc);
+ if(x>0)
+ printf(">0\n");
+ else
+ printf("<=0\n");
+ }
+ '''
+ self.do_run(src, '<=0')
+
def test_i32_mul_precise(self):
if self.emcc_args == None: return self.skip('needs ta2')