[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:49:25 UTC 2010


The following commit has been merged in the master branch:
commit de78828111d19249e1cf391901be917b6520fd2f
Author: John Goerzen <jgoerzen at complete.org>
Date:   Fri Dec 3 22:56:05 2004 +0100

    More test hacking
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-7)

diff --git a/testsrc/ConfigParser/Maintest.hs b/testsrc/ConfigParser/Maintest.hs
index e482e87..9efd45d 100644
--- a/testsrc/ConfigParser/Maintest.hs
+++ b/testsrc/ConfigParser/Maintest.hs
@@ -29,10 +29,11 @@ testfile = "testsrc/ConfigParser/test.cfg"
 p inp = forceEither $ readstring emptyCP inp
 f msg inp exp conv = TestLabel msg $ TestCase $ assertEqual "" (Right exp) (conv (p inp))
 
+-- f2s, f2b are useful for matching Left return values
 f2s :: String -> Either CPError String -> Either CPError String -> Test
-f2s msg exp res = TestLabel msg $ TestCase $ assertEqual "" exp res
+f2s = f2
 f2b :: String -> Either CPError Bool -> Either CPError Bool -> Test
-f2b msg exp res = TestLabel msg $ TestCase $ assertEqual "" exp res
+f2b = f2
 
 f2 msg exp res = TestLabel msg $ TestCase $ assertEqual "" exp res
 f3 msg inp exp conv = TestLabel msg $ TestCase $ assertEqual "" exp (conv (p inp))

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list