]> git.rkrishnan.org Git - functorrent.git/blobdiff - src/FuncTorrent/Bencode.hs
QuickCheck tests now terminate successfully.
[functorrent.git] / src / FuncTorrent / Bencode.hs
index 8b6ff5229909266a42e85bb4a47952f32afe7af8..62d476733530ad650d6a293f5255d3c6c26ba147 100644 (file)
@@ -38,9 +38,9 @@ instance Arbitrary BVal where
                                , Bstr <$> arbitrary]
                 bval n = oneof [ Bint <$> arbitrary
                                , Bstr <$> arbitrary
-                               , Blist <$> vectorOf n arbitrary
+                               , Blist <$> vectorOf n (bval (n `div` 4))
                                , do keys <- vectorOf n arbitrary
-                                    vals <- vectorOf n arbitrary
+                                    vals <- vectorOf n (bval (n `div` 4))
                                     return $ Bdict $ fromList $ zip keys vals ]
 
 -- getters