aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-10 18:52:35 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-10 18:52:35 -0700
commitfd28971b9a57ee0b9d6237e38fdb75ec2b7b8016 (patch)
treeb5e1d38524e2b2951beecda3bdc8056f4e8b4d05 /tests/runner.py
parent5c7eb019a48e181be105964dd0867e28de3e6de8 (diff)
force shifts on i64s to remain integers
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 990bc8ea..9a4af753 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -406,10 +406,20 @@ if 'benchmark' not in str(sys.argv):
long long x = 0x0000def123450789ULL; // any bigger than this, and we
long long y = 0x00020ef123456089ULL; // start to run into the double precision limit!
printf("*%Ld,%Ld,%Ld,%Ld,%Ld*\\n", x, y, x | y, x & y, x ^ y, x >> 2, y << 2);
+
+ printf("*");
+ long long z = 13;
+ int n = 0;
+ while (z > 1) {
+ printf("%.2f,", (float)z); // these must be integers!
+ z = z >> 1;
+ n++;
+ }
+ printf("*%d*\\n", n);
return 0;
}
'''
- self.do_test(src, '*245127260211081,579378795077769,808077213656969,16428841631881,791648372025088*')
+ self.do_test(src, '*245127260211081,579378795077769,808077213656969,16428841631881,791648372025088*\n*13.00,6.00,3.00,*3*')
def test_unsigned(self):
global CORRECT_SIGNS; CORRECT_SIGNS = 1 # We test for exactly this sort of thing here