speed up slow quickcheck test

Only test parsing of ContentIdentifier lists, not the whole log.
This commit is contained in:
Joey Hess 2019-03-06 16:43:41 -04:00
parent c6c5f6336b
commit 1b3d04979e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -68,6 +68,8 @@ parseContentIdentifierList = do
listparser first (cid:rest)
)
prop_parse_build_contentidentifier_log :: ContentIdentifierLog -> Bool
prop_parse_build_contentidentifier_log :: NonEmpty ContentIdentifier -> Bool
prop_parse_build_contentidentifier_log l =
parseLog (toLazyByteString (buildLog l)) == l
let v = A.parseOnly parseContentIdentifierList $ L.toStrict $
toLazyByteString $ buildContentIdentifierList l
in v == Right l