avoid generating arbitrary MetaData with illegal fields
This commit is contained in:
parent
eb3b6b7e09
commit
5c79fa0351
2 changed files with 6 additions and 1 deletions
|
@ -264,7 +264,9 @@ parseMetaData p = (,)
|
||||||
instance Arbitrary MetaData where
|
instance Arbitrary MetaData where
|
||||||
arbitrary = do
|
arbitrary = do
|
||||||
size <- arbitrarySizedBoundedIntegral `suchThat` (< 500)
|
size <- arbitrarySizedBoundedIntegral `suchThat` (< 500)
|
||||||
MetaData . M.fromList <$> vector size
|
MetaData . M.filterWithKey legal . M.fromList <$> vector size
|
||||||
|
where
|
||||||
|
legal k _v = legalField $ fromMetaField k
|
||||||
|
|
||||||
instance Arbitrary MetaValue where
|
instance Arbitrary MetaValue where
|
||||||
arbitrary = MetaValue <$> arbitrary <*> arbitrary
|
arbitrary = MetaValue <$> arbitrary <*> arbitrary
|
||||||
|
|
|
@ -62,3 +62,6 @@ e s tDse.t
|
||||||
|
|
||||||
# End of transcript or log.
|
# End of transcript or log.
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
|
> A sort of windows-specific bug in the test suite. I've fixed it. [[done]]
|
||||||
|
> --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue