aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-03-05 18:10:31 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2013-03-07 00:19:53 +0700
commit65d5914ecb5c3c8c16722712657a9f16b73962d9 (patch)
tree7ce40d2ada2228e74099b19147361b78a269892e /tests
parent97407b218c6d816e964f1faa1420db46ea1fec3c (diff)
Implement llabs().
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 5adafddd..9ca052c7 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -1054,6 +1054,19 @@ m_divisor is 1091269979
}
''', 'c = 4ca38a6bd2973f97')
+ def test_i64_llabs(self):
+ if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')
+ Settings.PRECISE_I64_MATH = 2
+ self.do_run(r'''
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ int main(int argc, char ** argv) {
+ printf("%lld,%lld\n", llabs(-576460752303423489), llabs(576460752303423489));
+ return 0;
+ }
+ ''', '576460752303423489,576460752303423489')
+
def test_i64_zextneg(self):
if Settings.USE_TYPED_ARRAYS != 2: return self.skip('full i64 stuff only in ta2')