1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

Add an Arbitrary instance for Line.

This commit is contained in:
Rob Rix 2015-12-11 00:19:48 -05:00
parent e84d8804bf
commit 91140aa8fa

View File

@ -25,6 +25,11 @@ instance Arbitrary HTML where
Span <$> arbitrary <*> arbitrary,
const Break <$> (arbitrary :: Gen ()) ]
instance Arbitrary Line where
arbitrary = oneof [
Line <$> arbitrary,
const EmptyLine <$> (arbitrary :: Gen ()) ]
main :: IO ()
main = hspec $ do
describe "Term" $ do