default-language: Haskell2010
hs-source-dirs: test
main-is: Main.hs
- other-modules: MagneturiTests
+ other-modules: BencodeTests
+ , MagneturiTests
+ , MetainfoTests
build-depends: base
, bytestring
, functorrent
, Bstr <$> arbitrary]
bval n = oneof [ Bint <$> arbitrary
, Bstr <$> arbitrary
- , Blist <$> vectorOf n (bval (n `div` 4))
- , do keys <- vectorOf n genNonEmptyString
- vals <- vectorOf n (bval (n `div` 4))
+ , Blist <$> vectorOf (n `div` 2) (bval (n `div` 4))
+ , do keys <- vectorOf (n `div` 2) genNonEmptyString
+ vals <- vectorOf (n `div` 2) (bval (n `div` 4))
return $ Bdict $ fromList $ zip keys vals ]
-- getters