aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-04-21 10:45:57 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-04-21 10:45:57 -0700
commit3d4cc9e9312a954a79ee7df7ffe0fc0495c37b24 (patch)
tree0c5dfc3ea461183bc5abe4a5a649240b6c3bc328 /tests/runner.py
parent5128461279805416694953c78bfbc7ad4bcde7be (diff)
fix for printing very small floats
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 39dc77dd..c425ef41 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -433,10 +433,10 @@ if 'benchmark' not in sys.argv:
#include <stdio.h>
int main()
{
- float x = 1.234, y = 3.5;
+ float x = 1.234, y = 3.5, q = 0.00000001;
y *= 3;
int z = x < y;
- printf("*%d,%d,%.1f,%d,%.4f*\\n", z, int(y), y, (int)x, x);
+ printf("*%d,%d,%.1f,%d,%.4f,%.2f*\\n", z, int(y), y, (int)x, x, q);
/*
// Rounding behavior
@@ -449,7 +449,7 @@ if 'benchmark' not in sys.argv:
return 0;
}
'''
- self.do_test(src, '*1,10,10.5,1,1.2339*')
+ self.do_test(src, '*1,10,10.5,1,1.2340,0.00*')
def test_math(self):
src = '''