diff options
author | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-06 11:15:04 +0200 |
---|---|---|
committer | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-06 11:15:04 +0200 |
commit | 7001a61e8fa105cd51715e471d0a682bf23528fd (patch) | |
tree | 2ee75ab9a5959baa23db6fd9b60c63aa610ada13 /test/Crypto/Macaroon/Instances.hs | |
parent | a22bcdb648d1f540ae895cb246997dcdcce7b568 (diff) | |
download | hmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.tar.gz hmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.tar.zst hmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.zip |
Nixify package & documentation
Added quickcheck helper
Diffstat (limited to 'test/Crypto/Macaroon/Instances.hs')
-rw-r--r-- | test/Crypto/Macaroon/Instances.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Crypto/Macaroon/Instances.hs b/test/Crypto/Macaroon/Instances.hs index 5d4b062..4e2f39f 100644 --- a/test/Crypto/Macaroon/Instances.hs +++ b/test/Crypto/Macaroon/Instances.hs | |||
@@ -23,6 +23,12 @@ import Test.Tasty.QuickCheck | |||
23 | 23 | ||
24 | import Crypto.Macaroon | 24 | import Crypto.Macaroon |
25 | 25 | ||
26 | |||
27 | -- | Adjust the size parameter, by transforming it with the given | ||
28 | -- function. | ||
29 | scale :: (Int -> Int) -> Gen a -> Gen a | ||
30 | scale f g = sized (\n -> resize (f n) g) | ||
31 | |||
26 | newtype Url = Url { unUrl :: BS.ByteString } deriving (Show) | 32 | newtype Url = Url { unUrl :: BS.ByteString } deriving (Show) |
27 | 33 | ||
28 | instance Arbitrary Url where | 34 | instance Arbitrary Url where |