aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorJulien Tanguy <julien.tanguy@jhome.fr>2015-05-06 11:15:04 +0200
committerJulien Tanguy <julien.tanguy@jhome.fr>2015-05-06 11:15:04 +0200
commit7001a61e8fa105cd51715e471d0a682bf23528fd (patch)
tree2ee75ab9a5959baa23db6fd9b60c63aa610ada13 /test
parenta22bcdb648d1f540ae895cb246997dcdcce7b568 (diff)
downloadhmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.tar.gz
hmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.tar.zst
hmacaroons-7001a61e8fa105cd51715e471d0a682bf23528fd.zip
Nixify package & documentation
Added quickcheck helper
Diffstat (limited to 'test')
-rw-r--r--test/Crypto/Macaroon/Instances.hs6
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
24import Crypto.Macaroon 24import Crypto.Macaroon
25 25
26
27-- | Adjust the size parameter, by transforming it with the given
28-- function.
29scale :: (Int -> Int) -> Gen a -> Gen a
30scale f g = sized (\n -> resize (f n) g)
31
26newtype Url = Url { unUrl :: BS.ByteString } deriving (Show) 32newtype Url = Url { unUrl :: BS.ByteString } deriving (Show)
27 33
28instance Arbitrary Url where 34instance Arbitrary Url where