[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
jeremy.shaw
jeremy.shaw at linspireinc.com
Fri Apr 23 15:11:47 UTC 2010
The following commit has been merged in the master branch:
commit 773aadeeaaad90adbbbab55d07fdad121cf8e210
Author: jeremy.shaw <jeremy.shaw at linspireinc.com>
Date: Wed Sep 13 03:26:17 2006 +0100
removed qunit from Listtests.hs and modified code to use MissingH.HUnit.qctest instead
diff --git a/testsrc/Listtest.hs b/testsrc/Listtest.hs
index c7e80bf..dc9f78a 100644
--- a/testsrc/Listtest.hs
+++ b/testsrc/Listtest.hs
@@ -17,24 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
module Listtest(tests) where
-import Test.HUnit
-import MissingH.List
--- module QUnit where
-import System.Random hiding (split)
import Data.List
--- import Test.HUnit
-import Test.QuickCheck as QC
-
-qunit :: (QC.Testable a) => String -> a -> Test
-qunit lbl property =
- TestLabel lbl $ TestCase $
- do stdGen <- newStdGen
- case generate 100 stdGen (evaluate property) of
- (Result (Just True) _ _ ) -> return ()
- (Result res stamp args) -> assertFailure $ show (res, stamp, args)
-
+import Test.HUnit
+import MissingH.List
+import MissingH.HUnit
test_delFromAL =
@@ -232,14 +220,14 @@ test_spanList =
test_merge =
- qunit "prop_merge" prop_merge
+ qctest "prop_merge" prop_merge
prop_merge xs ys =
merge (sort xs) (sort ys) == sort (xs ++ ys)
where types = xs :: [Int]
test_mergeBy =
- qunit "test_mergeBy" prop_mergeBy
+ qctest "test_mergeBy" prop_mergeBy
prop_mergeBy xs ys =
mergeBy cmp (sortBy cmp xs) (sortBy cmp ys) == sortBy cmp (xs ++ ys)
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list