packages feed

file-location 0.4.7.1 → 0.4.8

raw patch · 2 files changed

+29/−1 lines, 2 filesdep +HUnitPVP ok

version bump matches the API change (PVP)

Dependencies added: HUnit

API changes (from Hackage documentation)

+ Test.FileLocation: assertB :: Q Exp
+ Test.FileLocation: assertEq :: Q Exp

Files

+ Test/FileLocation.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE TemplateHaskell #-}+module Test.FileLocation where++import qualified Test.HUnit as HUnit+import Language.Haskell.TH+import FileLocation (locationToString)+import Control.Monad.IO.Class (liftIO)++-- | A version of assertEqual that gives location information.+--+-- TODO: push upstream to file-location+assertEq :: Q Exp+assertEq = do+  loc <- location+  let prefix = locationToString loc ++ " "+  [|(\x -> liftIO . HUnit.assertEqual prefix x)|]++-- | a MonadIO version of assertBool that gives location information.+--+-- TODO: push upstream to file-location+assertB :: Q Exp+assertB = do+  loc <- location+  let prefix = locationToString loc ++ "assertB "+  [|(liftIO . HUnit.assertBool prefix)|]+
file-location.cabal view
@@ -1,5 +1,5 @@ Name:                file-location-Version:             0.4.7.1+Version:             0.4.8 Synopsis:            common functions that show file location information Homepage:            https://github.com/gregwebs/FileLocation.hs License:             BSD3@@ -64,6 +64,7 @@                    Control.Exception.FileLocation,                    Debug.Util,                    FileLocation.LocationString+                   Test.FileLocation      -- Packages needed in order to build this package.   Build-depends:  base >= 4 && < 5@@ -72,6 +73,7 @@                 , th-orphans       >= 0.9                 , transformers     >= 0.2 && < 0.5                 , containers+                , HUnit  -- This just helps you get the packages for test/main.hs -- tests are ran with test/run.sh