[commit: testsuite] master: Simplify driver code slightly (cd178d3)

Ian Lynagh igloo at earth.li
Thu Feb 7 18:41:48 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/cd178d3b61e8fa7a4cc79aaba391accdd46b8f14

>---------------------------------------------------------------

commit cd178d3b61e8fa7a4cc79aaba391accdd46b8f14
Author: Ian Lynagh <ian at well-typed.com>
Date:   Thu Feb 7 17:01:46 2013 +0000

    Simplify driver code slightly

>---------------------------------------------------------------

 driver/testlib.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 141b432..88ff472 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -1141,8 +1141,7 @@ def checkStats(stats_file, range_fields):
                 expectedLen = len(expectedStr)
                 length = max(map (lambda x : len(str(x)), [expected, lowerBound, upperBound, val]))
                 def display(descr, val, extra):
-                    valStr = str(val)
-                    print descr, (' ' * (length - len(valStr))) + valStr, extra
+                    print descr, string.rjust(str(val), length), extra
                 display('    Expected    ' + field + ':', expected, '+/-' + str(dev) + '%')
                 display('    Lower bound ' + field + ':', lowerBound, '')
                 display('    Upper bound ' + field + ':', upperBound, '')





More information about the ghc-commits mailing list