[commit: packages/filepath] master: Remove dead code (ed063fb)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:33:35 UTC 2015


Repository : ssh://git@git.haskell.org/filepath

On branch  : master
Link       : http://git.haskell.org/packages/filepath.git/commitdiff/ed063fbdb110afe40ca17814806c0627278a1e00

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

commit ed063fbdb110afe40ca17814806c0627278a1e00
Author: Neil Mitchell <ndmitchell at gmail.com>
Date:   Sun Oct 19 14:02:19 2014 +0100

    Remove dead code


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

ed063fbdb110afe40ca17814806c0627278a1e00
 tests/AutoTest.hs | 68 -------------------------------------------------------
 1 file changed, 68 deletions(-)

diff --git a/tests/AutoTest.hs b/tests/AutoTest.hs
index 8526c99..38a9501 100644
--- a/tests/AutoTest.hs
+++ b/tests/AutoTest.hs
@@ -40,71 +40,3 @@ quickSafe prop = do
     case res of
         Success{} -> return ()
         _ -> error $ show res
-    -- checkit quick prop
-
--- below is mainly stolen from Test.QuickCheck, modified to crash out on failure
--- Doesn't compile with QuickCheck 2.4.1.1, so we just use the quickCheck function for now
-
-{-
-quick :: Config
-quick = Config
-  { configMaxTest = 500
-  , configMaxFail = 1000
-  , configSize    = (+ 3) . (`div` 2)
-  , configEvery   = \n args -> let s = show n in s ++ [ '\b' | _ <- s ]
-  }
-
-checkit :: Testable a => Config -> a -> IO ()
-checkit config a =
-  do rnd <- newStdGen
-     tests config (evaluate a) rnd 0 0 []
-
-
-tests :: Config -> Gen Result -> StdGen -> Int -> Int -> [[String]] -> IO () 
-tests config gen rnd0 ntest nfail stamps
-  | ntest == configMaxTest config = do done "OK, passed" ntest stamps
-  | nfail == configMaxFail config = do done "Arguments exhausted after" ntest stamps
-                                       error "More entropy required!"
-  | otherwise               =
-      do putStr (configEvery config ntest (arguments result))
-         case ok result of
-           Nothing    ->
-             tests config gen rnd1 ntest (nfail+1) stamps
-           Just True  ->
-             tests config gen rnd1 (ntest+1) nfail (stamp result:stamps)
-           Just False ->
-             error ( "Falsifiable, after "
-                   ++ show ntest
-                   ++ " tests:\n"
-                   ++ unlines (arguments result)
-                    )
-     where
-      result      = generate (configSize config ntest) rnd2 gen
-      (rnd1,rnd2) = split rnd0
-
-done :: String -> Int -> [[String]] -> IO ()
-done mesg ntest stamps =
-  do putStr ( mesg ++ " " ++ show ntest ++ " tests" ++ table )
- where
-  table = display
-        . map entry
-        . reverse
-        . sort
-        . map pairLength
-        . group
-        . sort
-        . filter (not . null)
-        $ stamps
-
-  display []  = ".\n"
-  display [x] = " (" ++ x ++ ").\n"
-  display xs  = ".\n" ++ unlines (map (++ ".") xs)
-
-  pairLength xss@(xs:_) = (length xss, xs)
-  entry (n, xs)         = percentage n ntest
-                       ++ " "
-                       ++ concat (intersperse ", " xs)
-
-  percentage n m        = show ((100 * n) `div` m) ++ "%"
--}
-



More information about the ghc-commits mailing list