packages feed

hspec-smallcheck (empty) → 0.0.0

raw patch · 5 files changed

+82/−0 lines, 5 filesdep +basedep +hspecdep +hspec-smallchecksetup-changed

Dependencies added: base, hspec, hspec-smallcheck, smallcheck

Files

+ LICENSE view
@@ -0,0 +1,19 @@+Copyright (c) 2013 Simon Hengel <sol@typeful.net>++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in+all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN+THE SOFTWARE.
+ Setup.lhs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+> import Distribution.Simple+> main = defaultMain
+ hspec-smallcheck.cabal view
@@ -0,0 +1,45 @@+name:             hspec-smallcheck+version:          0.0.0+license:          MIT+license-file:     LICENSE+copyright:        (c) 2013 Simon Hengel+maintainer:       Simon Hengel <sol@typeful.net>+build-type:       Simple+cabal-version:    >= 1.8+category:         Testing+stability:        experimental+bug-reports:      https://github.com/hspec/hspec-smallcheck/issues+homepage:         http://hspec.github.io/+synopsis:         SmallCheck support for the Hspec testing framework+description:      SmallCheck support for the Hspec testing framework++source-repository head+  type: git+  location: https://github.com/hspec/hspec-smallcheck++library+  ghc-options:+      -Wall+  hs-source-dirs:+      src+  exposed-modules:+      Test.Hspec.SmallCheck+  build-depends:+      base              == 4.*+    , hspec             >= 1.7+    , smallcheck        >= 1.0++test-suite spec+  type:+      exitcode-stdio-1.0+  ghc-options:+      -Wall -Werror+  hs-source-dirs:+      test+  main-is:+      Spec.hs+  build-depends:+      base              == 4.*+    , smallcheck+    , hspec-smallcheck+    , hspec
+ src/Test/Hspec/SmallCheck.hs view
@@ -0,0 +1,14 @@+{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}+{-# OPTIONS_GHC -fno-warn-orphans #-}+module Test.Hspec.SmallCheck (property) where++import           Control.Applicative+import           Test.Hspec.Core+import           Test.SmallCheck+import           Test.SmallCheck.Drivers++property :: Testable IO a => a -> Property IO+property = test++instance Example (Property IO) where+  evaluateExample c p = maybe Success (Fail . ppFailure) <$> smallCheckM (paramsSmallCheckDepth c) p
+ test/Spec.hs view
@@ -0,0 +1,1 @@+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}