packages feed

hjsonpointer 1.0.0.0 → 1.0.0.1

raw patch · 4 files changed

+19/−22 lines, 4 filesdep −HUnitPVP ok

version bump matches the API change (PVP)

Dependencies removed: HUnit

API changes (from Hackage documentation)

Files

MIT-LICENSE.txt view
@@ -1,5 +1,5 @@ The MIT License (MIT)-Copyright (c) 2015 Ian Grant Jeffries+Copyright (c) 2016 Ian Grant Jeffries  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
changelog.md view
@@ -1,3 +1,7 @@+# 1.0.0.1+++ Remove HUnit dep.+ # 1.0.0.0  + Bump aeson.
hjsonpointer.cabal view
@@ -1,5 +1,5 @@ name:               hjsonpointer-version:            1.0.0.0+version:            1.0.0.1 synopsis:           JSON Pointer library homepage:           https://github.com/seagreen/hjsonpointer license:            MIT@@ -9,7 +9,6 @@ category:           Data build-type:         Simple cabal-version:      >=1.10-tested-with:        GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 extra-source-files:   changelog.md   README.md@@ -38,13 +37,13 @@   hs-source-dirs:     test     ./+  main-is: Unit.hs   default-language: Haskell2010+  type: exitcode-stdio-1.0   default-extensions:     OverloadedStrings   ghc-options:     -Wall-  type: exitcode-stdio-1.0-  main-is: Unit.hs   other-modules: Example   build-depends:       aeson@@ -56,7 +55,6 @@     , vector     , hspec                >= 2.2 && < 2.3     , http-types           >= 0.8 && < 0.10-    , HUnit                >= 1.2 && < 1.4  source-repository head   type: git
test/Unit.hs view
@@ -3,17 +3,15 @@  import           Control.Arrow import           Data.Aeson-import qualified Data.Aeson.Pointer                   as P-import           Data.Text                            (Text)-import qualified Data.Text                            as T+import qualified Data.Aeson.Pointer      as P+import           Data.Text               (Text)+import qualified Data.Text               as T import           Data.Text.Encoding-import qualified Data.Vector                          as V-import           Network.HTTP.Types.URI               (urlDecode)+import qualified Data.Vector             as V+import           Network.HTTP.Types.URI  (urlDecode)  import           Test.Hspec-import           Test.QuickCheck                      (property)--import           Test.HUnit                           hiding (Test)+import           Test.QuickCheck         (property)  -- For GHCs before 7.10: import           Control.Applicative@@ -34,7 +32,7 @@ roundtrip :: P.Pointer -> Bool roundtrip a = Just a == decode (encode a) -jsonString :: Assertion+jsonString :: Expectation jsonString = traverse_ resolvesTo     [ (""      , specExample)     , ("/foo"  , Array $ V.fromList ["bar", "baz"])@@ -50,7 +48,7 @@     , ("/m~0n" , Number 8)     ] -uriFragment :: Assertion+uriFragment :: Expectation uriFragment = traverse_ resolvesTo . fmap (first decodeFragment) $     [ ("#"      , specExample)     , ("#/foo"  , Array $ V.fromList ["bar", "baz"])@@ -69,14 +67,11 @@     decodeFragment :: Text -> Text     decodeFragment = T.drop 1 . decodeUtf8 . urlDecode True . encodeUtf8 -resolvesTo :: (Text, Value) -> Assertion+resolvesTo :: (Text, Value) -> Expectation resolvesTo (t, expected) =     case P.unescape t of-        Left e  -> assertFailure (show e <> " error for pointer: " <> show t)-        Right p -> assertEqual-                       ("Resolved value for pointer: " <> show t)-                       (Right expected)-                       (P.resolve p specExample)+        Left e  -> expectationFailure (show e <> " error for pointer: " <> show t)+        Right p -> P.resolve p specExample `shouldBe` Right expected  specExample :: Value specExample = object