[commit: ghc] wip/nfs-locking: #146, add a test helper (077bf47)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:37:18 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/077bf477e5059ccbff621ea59a439830890b8f1c/ghc
>---------------------------------------------------------------
commit 077bf477e5059ccbff621ea59a439830890b8f1c
Author: Neil Mitchell <ndmitchell at gmail.com>
Date: Mon Jan 11 11:06:40 2016 +0000
#146, add a test helper
>---------------------------------------------------------------
077bf477e5059ccbff621ea59a439830890b8f1c
src/Test.hs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/Test.hs b/src/Test.hs
index 75b1b5d..a55e6e6 100644
--- a/src/Test.hs
+++ b/src/Test.hs
@@ -16,4 +16,8 @@ instance Arbitrary WayUnit where
testRules :: Rules ()
testRules =
phony "selftest" $ do
- liftIO $ quickCheck $ \(x :: Way) -> read (show x) == x
+ test $ \(x :: Way) -> read (show x) == x
+
+
+test :: Testable a => a -> Action ()
+test = liftIO . quickCheck
More information about the ghc-commits
mailing list