@@ -1,4 +1,5 @@
11{-# OPTIONS_GHC -fno-warn-orphans #-}
2+{-# LANGUAGE TypeSynonymInstances #-}
23-- provides Arbitrary instance for Pandoc types
34module Tests.Arbitrary ()
45where
@@ -7,6 +8,7 @@ import Test.QuickCheck.Arbitrary
78import Control.Monad (liftM, liftM2)
89import Text.Pandoc
910import Text.Pandoc.Shared
11+import Text.Pandoc.Builder
1012
1113realString :: Gen String
1214realString = elements wordlist
@@ -14,6 +16,12 @@ realString = elements wordlist
1416wordlist :: [String]
1517wordlist = ["foo","Bar","baz","\\","/",":","\"","'","féé"]
1618
19+instance Arbitrary Inlines where
20+ arbitrary = liftM fromList arbitrary
21+
22+instance Arbitrary Blocks where
23+ arbitrary = liftM fromList arbitrary
24+
1725instance Arbitrary Inline where
1826 arbitrary = resize 3 $ arbInline 3
1927