[commit: testsuite] master: Convert more helpers (46e4096)

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


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

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/46e40965bef66206b0e39dc362e7591a46f8953e

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

commit 46e40965bef66206b0e39dc362e7591a46f8953e
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Feb 11 15:11:52 2013 +0000

    Convert more helpers

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

 driver/testlib.py |   13 ++-----------
 tests/esc/all.T   |    2 +-
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/driver/testlib.py b/driver/testlib.py
index 942a722..7fcdaef 100644
--- a/driver/testlib.py
+++ b/driver/testlib.py
@@ -387,17 +387,8 @@ def _namebase( opts, nb ):
 
 # ---
 
-def if_tag( tag, f ):
-    if tag in config.compiler_tags:
-        return f
-    else:
-        return normal
-
-def unless_tag( tag, f ):
-    if not (tag in config.compiler_tags):
-        return f
-    else:
-        return normal
+def tag( t ):
+    return t in config.compiler_tags
 
 # ---
 def high_memory_usage(name, opts):
diff --git a/tests/esc/all.T b/tests/esc/all.T
index 55b21ee..31a4ba5 100644
--- a/tests/esc/all.T
+++ b/tests/esc/all.T
@@ -1,4 +1,4 @@
-esc = unless_tag('esc', skip)
+esc = unless(tag('esc'), skip)
 
 test('TestList', esc, compile, ['-fesc'])
 test('TestImport', esc, compile, ['-fesc'])





More information about the ghc-commits mailing list