quickcheck-io-0.2.0/0000755000000000000000000000000013120703771012417 5ustar0000000000000000quickcheck-io-0.2.0/LICENSE0000644000000000000000000000206713120703771013431 0ustar0000000000000000Copyright (c) 2013-2017 Simon Hengel 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. quickcheck-io-0.2.0/quickcheck-io.cabal0000644000000000000000000000215513120703771016125 0ustar0000000000000000-- This file has been generated from package.yaml by hpack version 0.18.0. -- -- see: https://github.com/sol/hpack name: quickcheck-io version: 0.2.0 synopsis: Use HUnit assertions as QuickCheck properties description: This package provides an orphan instance that allows you to use HUnit assertions as QuickCheck properties. category: Testing homepage: https://github.com/hspec/quickcheck-io#readme bug-reports: https://github.com/hspec/quickcheck-io/issues license: MIT license-file: LICENSE copyright: (c) 2013-2017 Simon Hengel author: Simon Hengel maintainer: Simon Hengel build-type: Simple cabal-version: >= 1.10 source-repository head type: git location: https://github.com/hspec/quickcheck-io library hs-source-dirs: src ghc-options: -Wall build-depends: QuickCheck >= 2.7 , HUnit >= 1.2.5 , base == 4.* exposed-modules: Test.QuickCheck.IO other-modules: Paths_quickcheck_io default-language: Haskell2010 quickcheck-io-0.2.0/Setup.lhs0000644000000000000000000000011413120703771014223 0ustar0000000000000000#!/usr/bin/env runhaskell > import Distribution.Simple > main = defaultMain quickcheck-io-0.2.0/src/0000755000000000000000000000000013120703771013206 5ustar0000000000000000quickcheck-io-0.2.0/src/Test/0000755000000000000000000000000013120703771014125 5ustar0000000000000000quickcheck-io-0.2.0/src/Test/QuickCheck/0000755000000000000000000000000013120703771016137 5ustar0000000000000000quickcheck-io-0.2.0/src/Test/QuickCheck/IO.hs0000644000000000000000000000150213120703771017000 0ustar0000000000000000{-# LANGUAGE CPP #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.QuickCheck.IO where import qualified Control.Exception as E import Test.HUnit.Lang import Test.QuickCheck.Property instance Testable Assertion where property = propertyIO #if !MIN_VERSION_QuickCheck(2,9,0) exhaustive _ = True #endif propertyIO :: Assertion -> Property propertyIO action = ioProperty $ do (action >> return succeeded) `E.catch` \ e -> return failed {theException = Just (E.toException e), reason = formatAssertion e} where formatAssertion e = case e of #if MIN_VERSION_HUnit(1,3,0) HUnitFailure _ err -> #else HUnitFailure err -> #endif #if MIN_VERSION_HUnit(1,5,0) formatFailureReason err #else err #endif