packages feed

esqueleto-postgis 2.0.0 → 2.0.1

raw patch · 3 files changed

+40/−2 lines, 3 filesdep +HUnitdep +call-stackdep −hw-hspec-hedgehogPVP ok

version bump matches the API change (PVP)

Dependencies added: HUnit, call-stack

Dependencies removed: hw-hspec-hedgehog

API changes (from Hackage documentation)

Files

Changelog.md view
@@ -1,5 +1,8 @@ # Change log for esqueleto-postgis project +## Version 2.0.1 +* drop haskell works hedghog dependency+ ## Version 2.0.0  * Hide irrelevant modules * delete hex module, use base16 hex approach instead.
esqueleto-postgis.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           esqueleto-postgis-version:        2.0.0+version:        2.0.1 homepage:       https://github.com/jappeace/esqueleto-postgis#readme bug-reports:    https://github.com/jappeace/esqueleto-postgis/issues author:         Jappie Klooster@@ -107,6 +107,7 @@         Wkb.LineSpec         Wkb.PointSpec         Wkb.PolygonSpec+        HaskellWorks.Hspec.Hedgehog    hs-source-dirs:       test@@ -121,4 +122,5 @@       hedgehog,       hspec,       tasty-hspec,-      hw-hspec-hedgehog < 0.2 &&   >= 0.1.0.4+      call-stack,+      HUnit,
+ test/HaskellWorks/Hspec/Hedgehog.hs view
@@ -0,0 +1,33 @@+{-# LANGUAGE FlexibleContexts  #-}+{-# LANGUAGE OverloadedStrings #-}++module HaskellWorks.Hspec.Hedgehog+  ( require+  , requireProperty+  , requireTest+  ) where++import Control.Monad          (unless)+import Control.Monad.IO.Class+import Data.CallStack+import Hedgehog+import Test.HUnit.Lang++import qualified Control.Exception as E++location :: HasCallStack => Maybe SrcLoc+location = case reverse callStack of+  (_, loc) : _ -> Just loc+  []           -> Nothing++require :: HasCallStack => Property -> Assertion+require p = do+  result <- liftIO $ check p+  unless result $+    E.throwIO (HUnitFailure location $ Reason "Hedgehog property test failed")++requireProperty :: HasCallStack => PropertyT IO () -> Assertion+requireProperty = require . property++requireTest :: HasCallStack => PropertyT IO () -> Assertion+requireTest = require . withTests 1 . property