[Pkg-haskell-commits] darcs: yi: QuickCheck 2.7 compatibility patch by Marce Fourné
Joachim Breitner
mail at joachim-breitner.de
Mon Aug 4 10:21:00 UTC 2014
Mon Aug 4 09:27:24 UTC 2014 Joachim Breitner <mail at joachim-breitner.de>
* QuickCheck 2.7 compatibility patch by Marce Fourn[_<U+00E9>_]
M ./changelog +6
A ./patches/Yi.Syntax.Tree-quickcheck-2.7-patch.diff
M ./patches/series +1
Mon Aug 4 09:27:24 UTC 2014 Joachim Breitner <mail at joachim-breitner.de>
* QuickCheck 2.7 compatibility patch by Marce Fourné
diff -rN -u old-yi/changelog new-yi/changelog
--- old-yi/changelog 2014-08-04 10:20:59.858127589 +0000
+++ new-yi/changelog 2014-08-04 10:20:59.866127591 +0000
@@ -1,3 +1,9 @@
+yi (0.7.1-2) UNRELEASED; urgency=medium
+
+ * QuickCheck 2.7 compatibility patch by Marce Fourné
+
+ -- Joachim Breitner <nomeata at debian.org> Mon, 04 Aug 2014 11:25:11 +0200
+
yi (0.7.1-1) unstable; urgency=medium
[ Marcel Fourné ]
diff -rN -u old-yi/patches/series new-yi/patches/series
--- old-yi/patches/series 2014-08-04 10:20:59.854127587 +0000
+++ new-yi/patches/series 2014-08-04 10:20:59.862127590 +0000
@@ -1,2 +1,3 @@
xpm-icons.diff
man-page.diff
+Yi.Syntax.Tree-quickcheck-2.7-patch.diff
diff -rN -u old-yi/patches/Yi.Syntax.Tree-quickcheck-2.7-patch.diff new-yi/patches/Yi.Syntax.Tree-quickcheck-2.7-patch.diff
--- old-yi/patches/Yi.Syntax.Tree-quickcheck-2.7-patch.diff 1970-01-01 00:00:00.000000000 +0000
+++ new-yi/patches/Yi.Syntax.Tree-quickcheck-2.7-patch.diff 2014-08-04 10:20:59.858127589 +0000
@@ -0,0 +1,60 @@
+Index: yi-0.7.1/src/library/Yi/Syntax/Tree.hs
+===================================================================
+--- yi-0.7.1.orig/src/library/Yi/Syntax/Tree.hs 2014-08-04 11:25:59.621939411 +0200
++++ yi-0.7.1/src/library/Yi/Syntax/Tree.hs 2014-08-04 11:25:59.621939411 +0200
+@@ -25,6 +25,7 @@
+ import Data.Monoid (First(..), Last(..), getFirst, getLast, mempty)
+ #ifdef TESTING
+ import Test.QuickCheck
++import Test.QuickCheck.Property (unProperty)
+ #endif
+
+ import Yi.Buffer.Basic
+@@ -339,33 +340,35 @@
+ let final@(_, (_, finalSubtree)) = fromLeafAfterToFinal p n
+ finalRegion = subtreeRegion finalSubtree
+ initialRegion = nodeRegion n
+-
++
+ whenFail (do putStrLn $ "final = " ++ show final
+ putStrLn $ "final reg = " ++ show finalRegion
+ putStrLn $ "initialReg = " ++ show initialRegion
+ putStrLn $ "p = " ++ show p
+- )
++ )
+ ((regionStart finalRegion <= p) && (initialRegion `includedRegion` finalRegion))
+
+ prop_allLeavesAfter :: NTTT -> Property
+-prop_allLeavesAfter (N n@(xs,t)) = do
++prop_allLeavesAfter (N n@(xs,t)) = property $ do
+ let after = allLeavesRelative afterChild n
+ (xs',t') <- elements after
+ let t'' = walkDown (xs',t)
+- whenFail (do putStrLn $ "t' = " ++ show t'
+- putStrLn $ "t'' = " ++ show t''
+- putStrLn $ "xs' = " ++ show xs'
+- ) (Just t' == t'' && xs <= xs')
++ unProperty $ whenFail (do
++ putStrLn $ "t' = " ++ show t'
++ putStrLn $ "t'' = " ++ show t''
++ putStrLn $ "xs' = " ++ show xs'
++ ) (Just t' == t'' && xs <= xs')
+
+ prop_allLeavesBefore :: NTTT -> Property
+-prop_allLeavesBefore (N n@(xs,t)) = do
++prop_allLeavesBefore (N n@(xs,t)) = property $ do
+ let after = allLeavesRelative beforeChild n
+ (xs',t') <- elements after
+ let t'' = walkDown (xs',t)
+- whenFail (do putStrLn $ "t' = " ++ show t'
+- putStrLn $ "t'' = " ++ show t''
+- putStrLn $ "xs' = " ++ show xs'
+- ) (Just t' == t'' && xs' <= xs)
++ unProperty $ whenFail (do
++ putStrLn $ "t' = " ++ show t'
++ putStrLn $ "t'' = " ++ show t''
++ putStrLn $ "xs' = " ++ show xs'
++ ) (Just t' == t'' && xs' <= xs)
+
+ prop_fromNodeToLeafAfter :: NTTT -> Property
+ prop_fromNodeToLeafAfter (N n) = forAll (pointInside (subtreeRegion $ snd n)) $ \p -> do
More information about the Pkg-haskell-commits
mailing list