1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Ensure that we can shrink when either childContents or childMargin is empty.

This commit is contained in:
Rob Rix 2016-05-20 16:39:58 -04:00
parent 21fac60bf1
commit 0e86c8149a

View File

@ -195,7 +195,7 @@ instance Arbitrary Child where
padding char = frequency [ (10, pure char)
, (1, pure '\n') ]
shrink Child {..} = Child childKey <$> shrinkList (const []) childContents <*> shrinkList (const []) childMargin
shrink Child {..} = Child childKey <$> "" : shrinkList (const []) childContents <*> "" : shrinkList (const []) childMargin
instance Show Child where
show Child {..} = childMargin ++ "(" ++ childKey ++ childContents ++ ")"