smartcheck 0.2.2 → 0.2.3
raw patch · 4 files changed
+38/−19 lines, 4 filesdep −testing-featdep ~QuickCheckdep ~smartcheck
Dependencies removed: testing-feat
Dependency ranges changed: QuickCheck, smartcheck
Files
- qc-tests/Tests.hs +1/−2
- smartcheck.cabal +6/−9
- src/Test/SmartCheck/Test.hs +0/−1
- src/Test/SmartCheck/Types.hs +31/−7
qc-tests/Tests.hs view
@@ -20,8 +20,7 @@ -------------------------------------------------------------------------------- -deriving instance Generic a => Generic (Tree a)-instance (SubTypes a, Generic a) => SubTypes (Tree a)+instance (SubTypes a) => SubTypes (Tree a) instance Q.Arbitrary a => Q.Arbitrary (Tree a) where arbitrary = Q.sized mkT
smartcheck.cabal view
@@ -1,8 +1,8 @@ Name: smartcheck-Version: 0.2.2+Version: 0.2.3 Synopsis: A smarter QuickCheck. Homepage: https://github.com/leepike/SmartCheck-Description: See the README.md.+Description: See the README.md: fast, small shrinking and generalization of failing test-cases from QuickCheck. License: BSD3 License-file: LICENSE.md Author: Lee Pike@@ -37,17 +37,16 @@ if flag(regression-flag) Build-depends: base >= 4.0 && < 5,- QuickCheck >= 2.8,+ QuickCheck == 2.8.2, mtl, random >= 1.0.1.1, containers >= 0.4, generic-deriving >= 1.2.1, ghc-prim,- testing-feat, lazysmallcheck else Build-depends: base >= 4.0 && < 5,- QuickCheck >= 2.8,+ QuickCheck == 2.8.2, mtl, random >= 1.0.1.1, containers >= 0.4,@@ -61,8 +60,6 @@ ghc-options: -Wall -fwarn-tabs- -auto-all- -caf-all -fno-warn-orphans -- QuickCheck some basic properties about SmartCheck.@@ -70,8 +67,8 @@ Hs-source-dirs: qc-tests Main-is: Tests.hs Build-depends: base >= 4.0 && < 5,- smartcheck >= 0.2,- QuickCheck >= 2.8,+ smartcheck,+ QuickCheck == 2.8.2, mtl, random >= 1.0.1.1, containers >= 0.4,
src/Test/SmartCheck/Test.hs view
@@ -68,7 +68,6 @@ import Data.List ( sort , group- , groupBy , intersperse )
src/Test/SmartCheck/Types.hs view
@@ -3,8 +3,8 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE DefaultSignatures #-}-{-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE OverlappingInstances #-} module Test.SmartCheck.Types ( SubT(..)@@ -26,7 +26,6 @@ import GHC.Generics import Data.Tree import Data.Typeable-import Control.Applicative import Control.Monad (ap) -- For instances@@ -252,11 +251,36 @@ -- We cover the instances supported by QuickCheck: -- http://hackage.haskell.org/packages/archive/QuickCheck/2.4.2/doc/html/Test-QuickCheck-Arbitrary.html -instance SubTypes Bool where baseType _ = True-instance SubTypes Char where baseType _ = True-instance SubTypes Double where baseType _ = True-instance SubTypes Float where baseType _ = True-instance SubTypes Int where baseType _ = True+instance SubTypes Bool where+ subTypes _ = []+ baseType _ = True+ replaceChild = replaceChild'+ toConstr = toConstr'+ showForest = showForest'+instance SubTypes Char where+ subTypes _ = []+ baseType _ = True+ replaceChild = replaceChild'+ toConstr = toConstr'+ showForest = showForest'+instance SubTypes Double where+ subTypes _ = []+ baseType _ = True+ replaceChild = replaceChild'+ toConstr = toConstr'+ showForest = showForest'+instance SubTypes Float where+ subTypes _ = []+ baseType _ = True+ replaceChild = replaceChild'+ toConstr = toConstr'+ showForest = showForest'+instance SubTypes Int where+ subTypes _ = []+ baseType _ = True+ replaceChild = replaceChild'+ toConstr = toConstr'+ showForest = showForest' instance SubTypes Integer where subTypes _ = [] baseType _ = True