packages feed

genvalidity-sydtest-hashable 0.0.0.0 → 1.0.0.0

raw patch · 5 files changed

+24/−41 lines, 5 filesdep ~genvalidity

Dependency ranges changed: genvalidity

Files

+ CHANGELOG.md view
@@ -0,0 +1,11 @@+# Changelog++## [1.0.0.0] - 2021-11-20++* Compatibility with `genvalidity >= 1.0.0.0`+* Renamed every combinator that ends in `OnValid` (or similar) to not have that suffix anymore.++### Removed++* Every combinator that relates to unchecked or invalid values.+
LICENSE view
@@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Tom Sydney Kerckhove+Copyright (c) 2016-2021 Tom Sydney Kerckhove  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
genvalidity-sydtest-hashable.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           genvalidity-sydtest-hashable-version:        0.0.0.0+version:        1.0.0.0 synopsis:       Standard spec's for Hashable instances for sydtest description:    Standard spec's for Hashable instances for sydtest category:       Testing@@ -13,10 +13,13 @@ bug-reports:    https://github.com/NorfairKing/validity/issues author:         Tom Sydney Kerckhove maintainer:     syd@cs-syd.eu-copyright:      2020 Tom Sydney Kerckhove+copyright:      Copyright: (c) 2016-2021 Tom Sydney Kerckhove license:        MIT license-file:   LICENSE build-type:     Simple+extra-source-files:+    LICENSE+    CHANGELOG.md  source-repository head   type: git@@ -32,7 +35,7 @@   build-depends:       QuickCheck     , base >=4.9 && <5-    , genvalidity >=0.5+    , genvalidity >=1.0     , genvalidity-sydtest     , hashable >=1.2     , sydtest@@ -53,7 +56,7 @@   build-depends:       QuickCheck     , base >=4.9 && <5-    , genvalidity >=0.7+    , genvalidity     , genvalidity-sydtest     , genvalidity-sydtest-hashable     , hashable
src/Test/Syd/Validity/Hashable.hs view
@@ -7,9 +7,7 @@ -- -- You will need @TypeApplications@ to use these. module Test.Syd.Validity.Hashable-  ( hashableSpecOnValid,-    hashableSpecOnInvalid,-    hashableSpec,+  ( hashableSpec,     hashableSpecOnArbitrary,     hashableSpecOnGen,   )@@ -28,34 +26,12 @@ -- -- Example usage: ----- > hashableSpecOnValid @Double-hashableSpecOnValid ::-  forall a.-  (Show a, Eq a, Typeable a, GenValid a, Hashable a) =>-  Spec-hashableSpecOnValid = hashableSpecOnGen @a genValid "valid" shrinkValid---- | Standard test spec for properties of Hashable instances for invalid values------ Example usage:------ > hashableSpecOnInvalid @Double-hashableSpecOnInvalid ::-  forall a.-  (Show a, Eq a, Typeable a, GenInvalid a, Hashable a) =>-  Spec-hashableSpecOnInvalid = hashableSpecOnGen @a genInvalid "invalid" shrinkInvalid---- | Standard test spec for properties of Hashable instances for unchecked values------ Example usage:--- -- > hashableSpec @Int hashableSpec ::   forall a.-  (Show a, Eq a, Typeable a, GenUnchecked a, Hashable a) =>+  (Show a, Eq a, Typeable a, GenValid a, Hashable a) =>   Spec-hashableSpec = hashableSpecOnGen @a genUnchecked "unchecked" shrinkUnchecked+hashableSpec = hashableSpecOnGen @a genValid "valid" shrinkValid  -- | Standard test spec for properties of Hashable instances for arbitrary values --
test/Test/Syd/Validity/HashableSpec.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeApplications #-} @@ -12,10 +11,8 @@  spec :: Spec spec = do-  hashableSpecOnValid @Rational-#if MIN_VERSION_hashable(1,3,0)-  hashableSpecOnValid @Double-#endif+  hashableSpec @Rational+  hashableSpec @Double   hashableSpec @Int   hashableSpecOnArbitrary @Int   hashableSpec @HashableValid@@ -40,8 +37,6 @@  instance GenValid HashableValid -instance GenUnchecked HashableValid- newtype HashableInvalid   = HashableInvalid Int   deriving (Show, Generic)@@ -64,5 +59,3 @@ instance Validity HashableInvalid  instance GenValid HashableInvalid--instance GenUnchecked HashableInvalid