[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 14:43:01 UTC 2010
The following commit has been merged in the master branch:
commit 1fa014c223c6e0948d0f2e09a25e19b8239a2130
Author: John Goerzen <jgoerzen at complete.org>
Date: Thu Oct 7 07:47:55 2004 +0100
Added first Listtest
Keywords:
(jgoerzen at complete.org--projects/missingh--head--1.0--patch-36)
diff --git a/ChangeLog b/ChangeLog
index 352aa12..36a149e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,21 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--1.0
#
+2004-10-07 01:47:55 GMT John Goerzen <jgoerzen at complete.org> patch-36
+
+ Summary:
+ Added first Listtest
+ Revision:
+ missingh--head--1.0--patch-36
+
+
+ new files:
+ testsrc/Listtest.hs
+
+ modified files:
+ ChangeLog testsrc/Tests.hs
+
+
2004-10-07 01:26:14 GMT John Goerzen <jgoerzen at complete.org> patch-35
Summary:
diff --git a/testsrc/Listtest.hs b/testsrc/Listtest.hs
new file mode 100644
index 0000000..b3a6623
--- /dev/null
+++ b/testsrc/Listtest.hs
@@ -0,0 +1,39 @@
+{- arch-tag: List tests main file
+Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+-}
+
+module Listtest(tests) where
+import HUnit
+import MissingH.List
+
+test_delFromAL =
+ let f :: [(String, Int)] -> [(String, Int)] -> Assertion
+ f inp exp = exp @=? (delFromAL inp "testkey") in
+ do
+ f [] []
+ f [("one", 1)] [("one", 1)]
+ f [("1", 1), ("2", 2), ("testkey", 3)] [("1", 1), ("2", 2)]
+ f [("testkey", 1)] []
+ f [("testkey", 1), ("testkey", 2)] []
+ f [("testkey", 1), ("2", 2), ("3", 3)] [("2", 2), ("3", 3)]
+ f [("testkey", 1), ("2", 2), ("testkey", 3), ("4", 4)]
+ [("2", 2), ("4", 4)]
+
+tests = TestList [TestLabel "delFromAL" (TestCase test_delFromAL)]
+
+
+
diff --git a/testsrc/Tests.hs b/testsrc/Tests.hs
index d323396..8a90990 100644
--- a/testsrc/Tests.hs
+++ b/testsrc/Tests.hs
@@ -17,11 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
module Tests(tests) where
-
import HUnit
+import qualified Listtest
test1 = TestCase ("x" @=? "x")
-tests = TestList [TestLabel "test1" test1]
+tests = TestList [TestLabel "test1" test1,
+ TestLabel "List" Listtest.tests]
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list