File: quickcheck-2.8-more-compat.patch

package info (click to toggle)
haskell-test-framework-quickcheck2 0.3.0.3-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 96 kB
  • sloc: haskell: 99; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 1,982 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
commit bb009e005c8a3d481c0773a038392adc4b442773
Author: Mikhail Glushenkov <mikhail.glushenkov@gmail.com>
Date:   Tue Aug 18 06:09:26 2015 +0200

    Improve QuickCheck 2.8 support.

--- a/Test/Framework/Providers/QuickCheck2.hs
+++ b/Test/Framework/Providers/QuickCheck2.hs
@@ -43,6 +43,9 @@
                     | PropertyFalsifiable String String -- ^ The property was not true. The strings are the reason and the output.
                     | PropertyNoExpectedFailure         -- ^ We expected that a property would fail but it didn't
                     | PropertyTimedOut                  -- ^ The property timed out during execution
+#if MIN_VERSION_QuickCheck(2,8,0)
+                    | PropertyInsufficientCoverage      -- ^ The tests passed but a use of 'cover' had insufficient coverage.
+#endif
 
 instance Show PropertyResult where
     show (PropertyResult { pr_status = status, pr_used_seed = used_seed, pr_tests_run = mb_tests_run })
@@ -52,6 +55,9 @@
             PropertyFalsifiable _rsn otpt -> otpt ++ "(used seed " ++ show used_seed ++ ")"
             PropertyNoExpectedFailure     -> "No expected failure with seed " ++ show used_seed ++ ", after " ++ tests_run_str ++ " tests"
             PropertyTimedOut              -> "Timed out after " ++ tests_run_str ++ " tests"
+#if MIN_VERSION_QuickCheck(2,8,0)
+            PropertyInsufficientCoverage  -> "Insufficient coverage after " ++ tests_run_str ++ " tests"
+#endif
       where
         tests_run_str = fmap show mb_tests_run `orElse` "an unknown number of"
 
@@ -115,3 +121,6 @@
     toPropertyStatus (GaveUp {})                               = PropertyArgumentsExhausted
     toPropertyStatus (Failure { reason = rsn, output = otpt }) = PropertyFalsifiable rsn otpt
     toPropertyStatus (NoExpectedFailure {})                    = PropertyNoExpectedFailure
+#if MIN_VERSION_QuickCheck(2,8,0)
+    toPropertyStatus (InsufficientCoverage _ _ _)              = PropertyInsufficientCoverage
+#endif