[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 15:11:23 UTC 2010


The following commit has been merged in the master branch:
commit e281f1c4e960bd2fd5276ba5aba7fdae01a019fd
Author: John Goerzen <jgoerzen at complete.org>
Date:   Fri Oct 13 23:09:06 2006 +0100

    Update tests

diff --git a/testsrc/ProgressTrackertest.hs b/testsrc/ProgressTrackertest.hs
index 167ee6a..b27d498 100644
--- a/testsrc/ProgressTrackertest.hs
+++ b/testsrc/ProgressTrackertest.hs
@@ -110,7 +110,7 @@ test_callback =
        (po2, _) <- setup
        (po3, _) <- setup
        
-       addCallback po (minc mv)
+       addCallback po (minc mcounter)
        addParent po po2
        incrP po 5
        readMVar mcounter >>= assertEqual "cb1" 1
@@ -118,7 +118,7 @@ test_callback =
        withStatus po2 (\x -> do 5 @=? completedUnits x
                                 200 @=? totalUnits x)
        
-       addCallback po2 mcounter2
+       addCallback po2 (minc mcounter2)
        incrP po 100
        readMVar mcounter2 >>= assertEqual "cb2" 1
        withStatus po2 (\x -> do 105 @=? completedUnits x
@@ -133,7 +133,7 @@ test_callback =
                                 210 @=? totalUnits x)
        
        
-    where minc mv _ _ = modifyMVar_ ((+) 1) mv
+    where minc mv _ _ = modifyMVar_ mv (\x -> return $ x + 1)
 
 tests = TestList [TestLabel "incrP" (TestCase test_incrP),
                   TestLabel "setP" (TestCase test_setP),

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list