Skip to content
This repository was archived by the owner on Feb 17, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions chell-quickcheck/Test/Chell/QuickCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,16 @@ property name prop = Chell.test name $ \opts -> do
, State.computeSize = computeSize (QuickCheck.maxSize args) (QuickCheck.maxSuccess args)
, State.numSuccessTests = 0
, State.numDiscardedTests = 0
#if MIN_VERSION_QuickCheck(2,12,0)
, State.classes = mempty
, State.tables = mempty
, State.requiredCoverage = mempty
, State.expected = True
, State.coverageConfidence = Nothing
#else
, State.collected = []
, State.expectedFailure = False
#endif

#if MIN_VERSION_QuickCheck(2,7,0)
, State.randomSeed = QCRandom.mkQCGen seed
Expand All @@ -77,12 +85,16 @@ property name prop = Chell.test name $ \opts -> do
#endif
}

#if MIN_VERSION_QuickCheck(2,12,0)
result <- Test.test state (QuickCheck.property prop)
#else
#if MIN_VERSION_QuickCheck(2,7,0)
let genProp = unProperty (QuickCheck.property prop)
#else
let genProp = QuickCheck.property prop
#endif
result <- Test.test state (Gen.unGen genProp)
#endif
let output = Test.output result
let notes = [("seed", show seed)]
let failure = Chell.failure { Chell.failureMessage = output }
Expand Down
2 changes: 1 addition & 1 deletion chell-quickcheck/chell-quickcheck.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ library
build-depends:
base >= 4.0 && < 5.0
, chell >= 0.3 && < 0.5
, QuickCheck >= 2.3 && < 2.11
, QuickCheck >= 2.3 && < 2.13
, random

exposed-modules:
Expand Down
3 changes: 2 additions & 1 deletion chell/Test/Chell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ import qualified Control.Exception
import Control.Exception (Exception)
import Control.Monad (ap, liftM)
import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.Algorithm.Patience as Patience
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Lazy.Char8
import Data.Foldable (Foldable, foldMap)
Expand All @@ -136,6 +135,8 @@ import qualified Data.Text.Lazy

import qualified Language.Haskell.TH as TH

import qualified Patience

import Test.Chell.Main (defaultMain)
import Test.Chell.Types

Expand Down
2 changes: 1 addition & 1 deletion chell/chell.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ library
base >= 4.1 && < 5.0
, bytestring >= 0.9
, options >= 1.0 && < 2.0
, patience >= 0.1 && < 0.2
, patience >= 0.2 && < 0.3
, random >= 1.0
, template-haskell >= 2.3
, text
Expand Down