[commit: testsuite] master: Convert more helper functions to the new scheme (3d7a744)

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


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3d7a744ed778dde764322d3b9d6ea5340a415e3b

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

commit 3d7a744ed778dde764322d3b9d6ea5340a415e3b
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Feb 11 14:18:38 2013 +0000

    Convert more helper functions to the new scheme

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

 driver/testlib.py             |   39 ++++++---------------------------------
 tests/driver/dynamicToo/all.T |    4 ++--
 2 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 51e18be..6f6ab4a 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -337,41 +337,14 @@ def msys( ):
 def cygwin( ):
     return config.cygwin
 
-def when_have_vanilla( f ):
-    if config.have_vanilla:
-        return f
-    else:
-        return normal
+def have_vanilla( ):
+    return config.have_vanilla
 
-def unless_have_vanilla( f ):
-    if config.have_vanilla:
-        return normal
-    else:
-        return f
+def have_dynamic( ):
+    return config.have_dynamic
 
-def when_have_dynamic( f ):
-    if config.have_dynamic:
-        return f
-    else:
-        return normal
-
-def unless_have_dynamic( f ):
-    if config.have_dynamic:
-        return normal
-    else:
-        return f
-
-def when_have_profiling( f ):
-    if config.have_profiling:
-        return f
-    else:
-        return normal
-
-def unless_have_profiling( f ):
-    if config.have_profiling:
-        return normal
-    else:
-        return f
+def have_profiling( ):
+    return config.have_profiling
 
 # ---
 
diff --git a/tests/driver/dynamicToo/all.T b/tests/driver/dynamicToo/all.T
index 25d48b0..6465d1e 100644
--- a/tests/driver/dynamicToo/all.T
+++ b/tests/driver/dynamicToo/all.T
@@ -7,8 +7,8 @@ test('dynamicToo001',
                    'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi',
                    's001', 'd001']),
       when(opsys('mingw32'), expect_broken(7665)),
-      unless_have_vanilla(skip),
-      unless_have_dynamic(skip)],
+      unless(have_vanilla(), skip),
+      unless(have_dynamic(), skip)],
      run_command,
      ['$MAKE -s --no-print-directory dynamicToo001'])
 





More information about the ghc-commits mailing list