[commit: testsuite] master: Convert more helpers to the new scheme (18cc9aa)

Ian Lynagh igloo at earth.li
Mon Feb 11 17:34:41 CET 2013


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/18cc9aaf8bac3f99923bc02ce09df720a9bae5eb

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

commit 18cc9aaf8bac3f99923bc02ce09df720a9bae5eb
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Feb 11 14:08:58 2013 +0000

    Convert more helpers to the new scheme

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

 driver/testlib.py  |   27 ++++++---------------------
 tests/driver/all.T |    2 +-
 2 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 02c7ba3..51e18be 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -328,29 +328,14 @@ def arch( arch ):
 def wordsize( ws ):
     return config.wordsize == str(ws)
 
-def if_unregisterised( f ):
-    if config.unregisterised:
-        return f
-    else:
-        return normal
+def unregisterised( ):
+    return config.unregisterised
 
-def unless_unregisterised( f ):
-    if config.unregisterised:
-        return normal
-    else:
-        return f
+def msys( ):
+    return config.msys
 
-def if_msys( f ):
-    if config.msys:
-        return f
-    else:
-        return normal
-
-def if_cygwin( f ):
-    if config.cygwin:
-        return f
-    else:
-        return normal
+def cygwin( ):
+    return config.cygwin
 
 def when_have_vanilla( f ):
     if config.have_vanilla:
diff --git a/tests/driver/all.T b/tests/driver/all.T
index 1bf7c7e..0020f18 100644
--- a/tests/driver/all.T
+++ b/tests/driver/all.T
@@ -362,6 +362,6 @@ test('T7060',
      run_command,
      ['$MAKE -s --no-print-directory T7060'])
 test('T7130', normal, compile_fail, ['-fflul-laziness'])
-test('T7563', if_unregisterised(skip), run_command,
+test('T7563', when(unregisterised(), skip), run_command,
      ['$MAKE -s --no-print-directory T7563'])
 





More information about the ghc-commits mailing list